It is currently Mon, 25 Sep 2023 11:21:40 GMT



 
Author Message
 csh script command line args
Quick simple question regarding shell scripts for the C-shell:

How do I pass command line args that have wildcard chars in them without
the shell expanding them?

the following doesn't work::

command line:
simple_script.sh *.h

contents of simple_script.sh:
ls $1

thanks alot,

kris



 Fri, 25 Jul 2003 10:43:18 GMT   
 csh script command line args

news:3A7E1583.A16B6A0B@yahoo.com...

This is not specific to csh.

It works exactly as you specified it.  It just doesn't produce the output
you expected.

Wildcards are expanded by the shell (unless you have globbing turned off),
so your shell script will be parsed however many arguments that *.h matches.

You just need to change your script to use $@ or $*



 Fri, 25 Jul 2003 11:26:43 GMT   
 
   [ 2 post ] 

Similar Threads

1. command line args in csh scripts (-f and -d)

2. command line args in csh aliases

3. Script/Command line args for FTP needed!!

4. CGI commands with command line args?

5. csh: command line instead of script

6. csh: command line instead of script

7. csh script command line argument length

8. csh: command line instead of script

9. command line arguments to csh script

10. What is the limit of args to csh/ksh scripts


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software