LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] All args in a script?

[ILUG] All args in a script?

kevin lyda kevin at suberic.net
Sat Sep 16 12:41:53 IST 2000


On Sat, Sep 16, 2000 at 10:57:32AM +0000, Conor Daly wrote:
> In a shell script, $# returns the number of arguments to the script.  What
> returns the actual arguments en-masse?  I know $1, $2 returns each in turn
> but I think there's something like $argv that will return all arguments at
> once.

$*

these things are useful on the command line.  for instance in sanity
checking when removing files as root:

ls foo bar* floyd/foozle*
[...listing, check it, and if happy do: ]
rm !*

of course it all goes to hell if you forget to type the ! ...

kevin

-- 
kevin at suberic.net        if you're not part of the solution
fork()'ed on 37058400    you're part of the precipitate.
meatspace place: home    http://suberic.net/~kevin/  yank? www.votenader.com
 >> want privacy? www.gnupg.org or www.pgp.com.  encrypted mail preferred <<




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell