problem with $argv[1] on Sun

Barry Margolin barmar at think.com
Fri Jan 18 10:13:24 AEST 1991


In article <122 at pikes.Colorado.EDU> ndimas at pikes.Colorado.EDU (Nicholas Dimas) writes:
>I put the following line in my .cshrc file and the system kept hanging
>up. Can someone shed some light. 
>
>alias tt ( date > $argv[1]; a.out >> $argv[1]; date >> $argv[1] ) &  
>
>I then did a "source .cshrc" command,it told me "Badly placed ()'s".

You have to quote the alias expansion if it contains shell metacharacters,
e.g.

alias tt "( date > $argv[1]; a.out >> $argv[1]; date >> $argv[1] ) &"

>The machine is a Sun.

So why are you posting to a newsgroup that is specifically for DEC machines
(Ultrix is DEC's Unix port)?  Try comp.unix.questions in the future.
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.unix.ultrix mailing list