From: James Mohr <linux-newbie@jimmo.com>
To: linux-newbie@vger.kernel.org
Subject: Re: Passing the entire command line
Date: Mon, 18 Nov 2002 18:21:51 +0100 [thread overview]
Message-ID: <200211181821.51710.linux-newbie@jimmo.com> (raw)
In-Reply-To: <004301c28f18$ee535160$4100a8c0@desarrolloxp>
> ----- Original Message -----
> From: "Adam Luchjenbroers" <Adam@Luchjenbroers.com>
> To: <linux-newbie@vger.kernel.org>
> Sent: Friday, November 15, 2002 9:05 PM
> Subject: Passing the entire command line
>
> > While bash can retrieve the different commandline values using the
>
> variables
>
> > $1, $2, $3, etc - is there a way to just read out them all at once (with
> > spaces between the values).
> >
> > I use startup scripts for many of my games, and I want the script to pass
> > through command line options at the end (for connecting to servers, etc).
The special variable $* (dollar-sign asterisk) contains ALL of the positional
parameters, regardless of how many they are. This is obiviously useful when
you do not know how many variables will be passed. The variable $0 stands for
the actual command. More details can be found here:
http://www.linux-tutorial.info/cgi-bin/display.pl?33&0&0&0&3
Regards,
jimmo
--
---------------------------------------
"Be more concerned with your character than with your reputation. Your
character is what you really are while your reputation is merely what others
think you are." -- John Wooden
---------------------------------------
Be sure to visit the Linux Tutorial: http://www.linux-tutorial.info
---------------------------------------
NOTE: All messages sent to me in response to my posts to newsgroups, mailing
lists or forums are subject to reposting.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
prev parent reply other threads:[~2002-11-18 17:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-16 3:05 Passing the entire command line Adam Luchjenbroers
2002-11-16 3:13 ` Mike Dresser
2002-11-18 15:41 ` hackob
2002-11-18 17:21 ` James Mohr [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200211181821.51710.linux-newbie@jimmo.com \
--to=linux-newbie@jimmo.com \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox