[comp.unix.ultrix] problem with $argv[1] on Sun

barmar@think.com (Barry Margolin) (01/18/91)

In article <122@pikes.Colorado.EDU> ndimas@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@think.com
{uunet,harvard}!think!barmar