From owner-freebsd-questions Tue Sep 2 05:43:50 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA04292 for questions-outgoing; Tue, 2 Sep 1997 05:43:50 -0700 (PDT) Received: from mail.virginia.edu (mail.Virginia.EDU [128.143.2.9]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id FAA04286 for ; Tue, 2 Sep 1997 05:43:47 -0700 (PDT) Received: from mail.cs.virginia.edu by mail.virginia.edu id aa29194; 2 Sep 97 8:43 EDT Received: from archive.cs.Virginia.EDU (root@archive.cs.Virginia.EDU [128.143.136.9]) by ares.cs.Virginia.EDU (8.8.5/8.8.5) with ESMTP id IAA26949; Tue, 2 Sep 1997 08:42:25 -0400 (EDT) Received: from stretch.cs.Virginia.edu (atf3r@stretch-fo.cs.Virginia.EDU [128.143.136.14]) by archive.cs.Virginia.EDU (8.7.5/8.7.3) with SMTP id IAA29941; Tue, 2 Sep 1997 08:42:24 -0400 (EDT) Received: by stretch.cs.Virginia.edu (4.1/SMI-2.0) id AA07254; Tue, 2 Sep 97 08:42:23 EDT Date: Tue, 2 Sep 1997 08:42:22 -0400 (EDT) From: "Adrian T. Filipi-Martin" Reply-To: adrian@virginia.edu To: "Riley J. McIntire" Cc: freebsd-questions@freebsd.org Subject: Re: the signature In-Reply-To: <199709012020.NAA18094@train.tgci.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 1 Sep 1997, Riley J. McIntire wrote: > > Date: Mon, 1 Sep 1997 15:06:40 -0400 (EDT) > > From: "Adrian T. Filipi-Martin" > > [snip] > > > > Here's what I use to dial-up and connect. I had to su to cat it > > because it is read protected for the obvious reaons. Replace the stuff > > in {}'s with your site specific values. > > > > > : adrian@lorax; su root -c "cat /etc/ppp/chat" > > Out of curiosity what is the "-c" option? Does it mean "run the > command [and exit]" ? It doesn't seem to be documented under "man > su". Is it documented elsewhere? Yes, it is just like the '-c' option for sh. Instead of starting an interactive shell, the argument is passed to the shell for execution. I just double checked the su manpage and found this. Aparently all non-su args are simply passed to the su'd shell, so you need to look at the sh man page for an explination of the '-c' flag. Unfortunately, there is no mention of the '-c' flag on the sh man page. > If the optional args are provided on the command line, they are passed to > the login shell of the target login. This allows it to pass arbitrary > commands via the -c option as understood by most shells. Note that -c > usually expects a single argument only; you have to quote it when passing > multiple words. cheers, Adrian -- adrian@virginia.edu ---->>>>| If I were stranded on a desert island, and System Administrator --->>>| I could only have one OS for my computer, Neurosurgical Visualzation Lab -->>| it would be FreeBSD. Think about it..... http://www.nvl.virginia.edu/ ->| http://www.freebsd.org/