Re: sudo multiple commands at once without shell script
"Matthew Bowie" <[email protected]> Sat, 25 Oct 2008 19:15:46 -0600
| Newsgroups | gmane.org.user-groups.nmlug |
|---|---|
| Message-ID | <[email protected]> |
From the sudo manpage: sudo sh -c "cd /home; du -s * | sort -rn > USAGE" On Sat, Oct 25, 2008 at 7:11 PM, Kelly Jones <[email protected]>wrote: > How do I run multiple sudo commands at once? This fails because the > semicolon ends the whole sudo command: > > > sudo whoami; whoami > root > user > > This confuses tcsh: > > monica:~> sudo ( whoami ; whoami ) > Badly placed ()'s. > > I could obviously write a shell script or something or do: > > > sudo whoami; sudo whoami > > but is there a better way? > > -- > We're just a Bunch Of Regular Guys, a collective group that's trying > to understand and assimilate technology. We feel that resistance to > new ideas and technology is unwise and ultimately futile. > _______________________________________________ > NMLUG mailing list > [email protected] > http://lists.b9.com/cgi-bin/mailman/listinfo/nmlug > -- Matthew Bowie Programmer/IT Consultant [email protected] _______________________________________________ NMLUG mailing list [email protected] http://lists.b9.com/cgi-bin/mailman/listinfo/nmlug