Mailinglist Archive: opensuse (882 mails)

< Previous Next >
Re: [opensuse] rc.local in openSUSE
  • From: "Brian K. White" <brian@xxxxxxxxx>
  • Date: Mon, 13 Dec 2010 21:22:50 -0500
  • Message-id: <4D06D4FA.80204@xxxxxxxxx>
On 12/13/2010 8:43 PM, Patrick Shanahan wrote:
* Brian K. White<brian@xxxxxxxxx> [12-13-10 20:35]:
On 12/13/2010 8:30 PM, Patrick Shanahan wrote:
20:30 wahoo:~> cat /etc/init.d/after.local
#/usr/local/bin/noip2.start start

if ! [ pidof noip2 ] ;
then /usr/local/bin/noip2.start start ;
fi


pidof noip2 || /usr/local/bin/noip2.start start

Tks. Shorter *is* better (!tm), but unless one realizes that "||"
means "OR" in this case.

And I continue to learn :^)
When/if I reach 80 I should know about everything!

Pre-apologizing for the complete nitpick, but I think the clearer word for this is "else", just like the fuller syntax it is shorthand for.

Inside of a [ ] or [[ ]] test it is more like a "logical or" like any other programming language.

English and most other natural languages unfortunately have a lot of ambiguity that a programming language cannot tolerate, and so "or" actually does, or can, work to describe both meanings of ||, so it's only for the sake of disambiguation I point this out, not because it's actually wrong, exactly.

--
bkw
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >