ambiguous output redirect
Linuxmisc » Unix shell
`ambiguous output redirect':
nawk '{print $1}' file1 > file1.out
I don't get the message in the bourne shell, and I don't get
it in csh/tcsh if I put parentheses around the nawk command:
(nawk '{print $1}' file1) > file1.out
Why are the parentheses needed? I don't need them if I'm
redirecting the output of a sort: sort file1 > file1.srt
Thanks,
Bob
krov...@cs.umass.edu
This is odd. I don't get that response:
cartan > echo $shell
/bin/csh
cartan > cat file
one two three four
five six seven eight
cartan > nawk '{print $1}' file > file1.out
cartan > cat file1.out
one
five
cartan > tcsh
cartan > echo $shell
/bin/tcsh
cartan > nawk '{print $1}' file > file2.out
cartan > cat file2.out
one
five
cartan > uname -a
SunOS cartan 4.1.1-IP 4 sun4c
What machine is this?
-tms
--
You can get further with a kind word | You can get further with a kind word
and a gun than a kind word alone. | and a phaser than a kind word and a gun.
--al capone | -- John Navarra
=======From the Lab of the MaD ScIenTIst....nava...@casbah.acns.nwu.edu========