[comp.unix.questions] C-shell script ... question

schip@iscnvx.uucp (Jan B Schipmolder) (06/25/91)

In Message-ID: <1991Jun24.230024.18513@iscnvx.uucp>
wurtz@iscnvx.uucp (J D Wurtz) writes (paraphrased):

> I am using the C shell. If the script      #!/bin/csh -f
>                                            echo ">>> dir = \c"
>                                            set dir = $<
>                                            echo dir = $dir
> is stored in file alfa and if I
> invoke it with                             set name = hello
>                                            alfa
>                                            >>> dir = $name
> 
> then the script will display "$name" rather than "hello". How can I
> get it to display "hello" rather than "$name" ?

Replace "set dir = $<" by "set dir = `eval echo $<`".