I have read from the book that , <> causes the file to be used as both input as well as output. Can anyone give me the scenario where <> will be useful?
No, it provides redirection for stdin and stdout for any set of two files, not using the same file as you describe.
take take a file with a single column of text and put a line number after the column
you can also use < somefile >> someotheroldfile to append to the outputfile
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
The purpose is as noted, opens for both input and output:
I don't recall an instance when I needed such a construct, however, it is syntactically acceptable:
producing:
It may be useful for writing on stdin, but I don't see the point of that.
Perhaps someone will describe a useful situation ... cheers, drl
( edit 1: corrected for exec mis-typed as echo )
( edit 2: misspelling )
Hi,
Anyone, please explain the purpose of /dev/ipldevice in AIX .. it would be a problem if there is no /dev/ipldevice while booting.
Regards,
Siva (1 Reply)
I'm new to Solaris and Linux and I was wondering if someone could explain to me in simple terms what the process Bind is on Solaris 10? Thanks, in advance. (6 Replies)
Hi All
Can anybody tell me what is the purpose of inv in the below command.
ftp -inv $RFTPSERVER /temp/te.txt << EOF
and << its stands for what..
Thanks (1 Reply)
Can any body kindly tell me what is the purpose of 2>&1 in the following commands.
nohup ./append_import.sh 1 > import1.out 2>&1 < /dev/null &
nohup ./append_import.sh 2 > import2.out 2>&1 < /dev/null & (1 Reply)
whats the purpose of the following script? who could run it? To what is the script refering that exceeds 75%? The mailbox?
What does sed 's/%//' do? (1 Reply)