04-07-2008
Google for "ed with a here document". These forums also have lots of threads on this topic; have you tried searching this site?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have an xml file that gets created as a part of daily build. I have to modify some lines in this file, uncomment some lines, comment some line, add 2 new lines in the file every time.
Is there an easier automated way to do this using perl, bash, or sh. I would appreciate it if someone can point... (1 Reply)
Discussion started by: saurabh1982
1 Replies
2. UNIX for Dummies Questions & Answers
Dear unix gurus,
I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this:
adam peter
blah blah blah
blah blah blah
car
01 30 200
02 31 400
03 57 121
.. .. ..
.. .. ..
n y... (8 Replies)
Discussion started by: tintin72
8 Replies
3. Shell Programming and Scripting
Hi
I want to read a file line by line and search for a particular string in each line(say for example string containing @ )and save that string into a variable.
Can someone suggest me the way to implement it.I am using K- shell
Thanks
Ishita (5 Replies)
Discussion started by: Ishita
5 Replies
4. Shell Programming and Scripting
Hi,
I am having a user.txt contains the name of users and passwd.txt file contains as passwd.txt
$cat usr.txt
root
bin
daemon
cap
$cat passwd.txt
root:x:0:0:root:/root:/usr/bin/ksh
bin:x:1:1:bin:/bin:/sbin/csh
daemon:x:2:2:daemon:/sbin:/usr/bin/ksh
adm:x:3:4:adm:/var/adm:/sbin/nologin... (4 Replies)
Discussion started by: Manabhanjan
4 Replies
5. UNIX for Dummies Questions & Answers
Hi, I'm attacking this from ignorance because I am not sure how to even ask the question.
Here is the mission:
I have a list of about 4,000 telephone numbers for past customers. I need to determine how many of these customers are still in business.
Obviously, I could call all the numbers.... (0 Replies)
Discussion started by: jccbin
0 Replies
6. Shell Programming and Scripting
I remember there is a sed switch i can use to edit and save the file at the same time, but i cannot recall it at all.
so instead of
-> sed 's/A/B/' file > file-tmp
-> mv file-tmp file
what can i do to just let sed edit and save the "file" (4 Replies)
Discussion started by: fedora
4 Replies
7. Shell Programming and Scripting
Hello,
I have a note pad at /usr/abc location with the following content, since it is a huge file i need to split it into multiple .txt files.
A123|akdhj |21kjsdff |b212b1b21 |0
A123asdasd |assdd |asdasdsdqw|6
A123|QEWQ |NMTGHJK |zxczxczx|3
A123|GEGBGH |RTYBN ... (15 Replies)
Discussion started by: j_panky
15 Replies
8. UNIX for Dummies Questions & Answers
Hi Everyone,
I have edited my cron using 'crontab -e'. When I try to save the changes using ':wq!' The file closes but the changes are not saved. I get the following messages:
"/tmp/crontabJFainH" 45 lines, 2996 characters
trail.log
crontab: error on previous line; unexpected character found... (11 Replies)
Discussion started by: Scarlet
11 Replies
9. Shell Programming and Scripting
I'm working on a script to execute a number of items. One being, editing particular files to add certain lines. I'm attempting to utilize sed, but, having issues when running from a bash script. Assistance is greatly appreciated.
My example:
sed -i '14 i\
# add these lines
add these lines to... (5 Replies)
Discussion started by: Nvizn
5 Replies
10. UNIX for Beginners Questions & Answers
Hi, totally new to linux base using windows when started learning and using computers.
but i remember that one pc was there , look alike windows desktop, but could not do the task as windows just click and open and view edit etc. But, you could do a little differently even saving in and opening... (8 Replies)
Discussion started by: jraju
8 Replies
NFXMIT(8) System Manager's Manual NFXMIT(8)
NAME
nfxmit, nfrcv - notesfile networking programs
SYNOPSIS
nfxmit -dsite [ -r ] [ -a ] [ -i ] [ -t date-spec ] [ -f file ] topic [ ... ]
nfrcv topic fromsystem
DESCRIPTION
Nfxmit and nfrcv implement networking of notesfiles. The nfxmit program packages eligible new articles and sends them to a remote system.
Nfrcv is the receiving end of this team.
Nfxmit sends the specified notesfiles to the site specified with the -d option. The -r option specifies that a request should be queued
for the remote site to transmit updates from its copies of the notesfiles sent. The -r option is used only if the other site does not
automatically queue updates of the notesfile.
Specify -a to have articles which originated in news(1) sent. News(1)-originated articles will usually reach each system via the news pro-
gram.
The -i option indicates that nfxmit is to send articles to the destination that it normally would not send. These articles are those that
were written there or were received at the local site from that particular site. The -i option is separate from the timestamp functions.
Articles are first selected on the basis of the time received and criteria for having passed through news or the destination system are
applied later.
A timestamp of the last transmission of each notesfile to each system is maintained. This is used for determining the notes to send. If a
different timestamp is desired, use the -t option. The supplied timestamp is used for this transfer and the stored timestamp is updated.
Specify -f myfile on the command line to have nfxmit read myfile for a list of notesfiles to be sent. This is useful if the number of
notesfiles is too numerous to list on a single command line. The shell meta-characters *, ?, [, and ] are recognized in both the topic
parameter and the entries in myfile.
Nfxmit uses uux(I) to invoke nfrcv on the remote system in order to process the incoming notes. Non-uucp connections are supported and
specified in the file /usr/spool/notes/.utilities/net.how
FILES
/usr/spool/notes/.utilities/net.how specifies connection methods between systems
/usr/spool/notes/.utilities/net.alias directory containing mapping of local and remote notesfile names
/usr/spool/notes/.sequencer/Sy:sysname Seqeuncing timestamps for sysname.
SEE ALSO
news(1), notes(1), nfcomment(3), uucp(1),
The Notesfile Reference Manual
AUTHORS
Ray Essick (uiucdcs!essick, essick%uiuc@csnet-relay.arpa)
Department of Computer Science
University of Illinois at Urbana-Champaign
Urbana, IL
Rob Kolstad (kolstad@convex.UUCP)
CONVEX Computer Corporation
Richardson, TX
University of Illinois NFXMIT(8)