ambiguous output redirect

Linux & Unix newsgroup archiveUnix shell1995

Linuxmisc » Unix shell

Bob Krove #1 / 2 Thu, 30 Nov 1995 05:27:17 GMT
In the csh/tcsh, the following command gives me the message
`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

John Navar #2 / 2 Thu, 30 Nov 1995 06:11:08 GMT

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========

Similar threads

This page is kept from the Linuxmisc archive of Linux and Unix newsgroups (snapshot 2014). Posts are shown as they were published, so commands, versions and addresses date from the original discussion. Linuxmisc.com now publishes a guide to online casinos in Canada.