On Sunday 22 October 2006 16:07, Grant <[EMAIL PROTECTED]> wrote 
about 'Re: [gentoo-user] Disabling net.ath0 backgrounding':
> > > How can I execute this from the command line?
> > You should just be able to type it in or cut/copy and paste from my
> > original email.  bash (and indeed most shells) don't interpret the
> > input from the command line significantly different than the content
> > of a script file.
> If I use spaces instead of line breaks so I can put it all on one line
> it doesn't seem to work out.  I'm missing something here.

You should be able to use linebreaks; bash will, appropriately, wait for 
more input if you are in the middle of a larger construct (if/while/etc.).

You should also be able to use spaces, but you have to add a semi-colon 
after each simple command.  If I was to do it as a one-liner it would be:
if /etc/init.d/net.ath0 status | grep -q started; then /etc/init.d/net.ath0 
restart; else /etc/init.d/net.ath0 start; fi

-- 
"If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability."
-- Gentoo Developer Ciaran McCreesh

Attachment: pgpElpy7OFPZr.pgp
Description: PGP signature

Reply via email to