[Gllug] csh shell scripting woes
Huw Lynes
huw-l at moving-picture.co.uk
Thu Mar 14 10:46:12 UTC 2002
On Thursday 14 March 2002 00:49, you wrote:
>
>
> rename [OPT] src [...] dst
>
> where OPT could be any of "-f" or "-i". The problem with this is that
> if you invoke a csh-script with "-f" as one of the arguments, it
> chokes and exits with this error message:
Erm, I may be misunderstanding ypu but passing stuff into csh should
not be a problem. As an utterly trivial example:
#!/bin/csh -f
echo $1
echo $2
exit 0
can be run as ./scriptname -f somestuff
outputting:
-f
somestuff
Where is the problem? Once you have your -f inside the script as an
argument you can interpret it how you want. Like I said I may be
completely missing the point here.
--
| Huw Lynes | The Moving Picture Company |
| System Administrator | 127 Wardour Street |
|.........................| London, W1F 0NL |
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list