Bash scripting question
David A. Bandel
david
Mon May 17 11:47:52 PDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 27 May 2003 13:49:56 -0400 (EDT)
<listmail at rotundus.com> wrote:
> Roger Oberholtzer wrote,
> > # This should echo command line parameters (or function paramaeters
> > # if #
> > placed in a shell function), one per line.
> >
> >
> > for param in $*
> > do
> > echo $param
> > done
>
> Thanks to you and also David Bandel for the help. I was hoping for a
> way in which I could reference a particular argument by number, but I
> suppose that I can accomplish the same by keeping a separate counter.
>
> The next silly question, how to get something running w/ setuid root.
You cannot run a script SUID. Think about it a minute and you?ll see
that you don?t ever want that capability.
The script runs and calls other programs/built-ins.
You could always code the thing up in Perl and use Perl?s SUID
interpreter. Or use C. Or use sudo to execute the script.
[snip]
Ciao,
David A. Bandel
- --
Focus on the dream, not the competition.
Nemesis Racing Team motto
GPG key autoresponder: mailto:david_key at pananix.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE+06vPj31PLQNUbV4RAqiXAJ9PH1RE/Dk3S+RJNyrDCCFFS4j4vwCgqf3o
BAATuixE//4cjtjoZs0DRN0=
=/+7y
-----END PGP SIGNATURE-----
More information about the Linux-users
mailing list