From owner-freebsd-questions@FreeBSD.ORG Sun Oct 26 01:53:37 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDC1C106566C for ; Sun, 26 Oct 2008 01:53:36 +0000 (UTC) (envelope-from m0rchand@comcast.net) Received: from QMTA01.westchester.pa.mail.comcast.net (qmta01.westchester.pa.mail.comcast.net [76.96.62.16]) by mx1.freebsd.org (Postfix) with ESMTP id 6A7638FC0C for ; Sun, 26 Oct 2008 01:53:36 +0000 (UTC) (envelope-from m0rchand@comcast.net) Received: from OMTA10.westchester.pa.mail.comcast.net ([76.96.62.28]) by QMTA01.westchester.pa.mail.comcast.net with comcast id XClt1a00X0cZkys51DgKab; Sun, 26 Oct 2008 01:40:19 +0000 Received: from [10.0.1.200] ([76.122.47.225]) by OMTA10.westchester.pa.mail.comcast.net with comcast id XDgJ1a00U4rWgJL3WDgJK5; Sun, 26 Oct 2008 01:40:19 +0000 X-Authority-Analysis: v=1.0 c=1 a=fAoonUXF0QAA:10 a=cecqnDtwW7YA:10 a=6I5d2MoRAAAA:8 a=f0x5yX3ctx78b4WUIMYA:9 a=OM8J3XVwS4jVWiv0NpUA:7 a=kxdI8eMnJBfS6KvysoONq5_iTPQA:4 a=SV7veod9ZcQA:10 a=XF7b4UCPwd8A:10 Message-Id: <040D18B2-E661-45BB-942B-9859ECA080C6@comcast.net> From: Tom Marchand To: freebsd-questions@freebsd.org In-Reply-To: <26face530810251811i3757db68wb7ed44faaf51444b@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Sat, 25 Oct 2008 21:40:17 -0400 References: <26face530810251811i3757db68wb7ed44faaf51444b@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) Subject: Re: sudo multiple commands at once without shell script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 01:53:37 -0000 This works for me: sudo sh -c "whoami;whoami" On Oct 25, 2008, at 9:11 PM, Kelly Jones 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. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org > "