[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] rc.d integration for the bluetooth subsystem
- To: Maksim Yevmenkin <maksim_(_dot_)_yevmenkin_(_at_)_savvis_(_dot_)_net>
- Subject: Re: [RFC] rc.d integration for the bluetooth subsystem
- From: Yar Tikhiy <yar_(_at_)_comp_(_dot_)_chem_(_dot_)_msu_(_dot_)_su>
- Date: Tue, 8 Nov 2005 21:32:04 +0300
- Cc: freebsd-bluetooth_(_at_)_freebsd_(_dot_)_org, Brooks Davis <brooks_(_at_)_one-eyed-alien_(_dot_)_net>, freebsd-rc_(_at_)_freebsd_(_dot_)_org
On Mon, Nov 07, 2005 at 10:27:23AM -0800, Maksim Yevmenkin wrote:
> Yar Tikhiy wrote:
>
> if expr "$_line" : "[a-zA-Z0-9_]*=" > /dev/null 2>&1 ; then
> ...
> fi
>
> i do not really have any objection to this. since i already pass the
> value through eval i might as well pass the entire line.
And so the users will be able to use basic sh(1) tricks in the lines.
> >And AFAIK stdin to a while loop can be redirected w/o enclosing
> >the loop in braces.
>
> sure, but it looked more clear (to me anyway) this way :)
Hmmm, I'm unsure if it worked at all ;-) In sh(1) you need to
place a ';' before '}' if there is no '\n' after the last command
in braces. That is, the sh(1) syntax dictates that you can write
{ command1; command2; }
or
{
command1
command2
}
but not
{ command1
command2 }
In the last case '}' will be passed as an argument to command2
and shell will croak on brace mismatch.
For some reason '}' behaves like a command itself in sh(1),
unlike ')'.
--
Yar
_______________________________________________
freebsd-bluetooth_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "freebsd-bluetooth-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org