[wplug] Bash conditional help

Tom Rhodes trhodes at FreeBSD.org
Sun May 4 14:06:38 EDT 2008


On Sat, 3 May 2008 10:24:01 -0400
scoob8000 <scoob8000 at gmail.com> wrote:

> >
> > And more.  :)
> >
> > Actually, I don't use bash, but the following works in ksh and sh:
> >
> > myvar="orange orange apple grape"
> >
> > if echo $myvar | grep apple
> >  then echo "got an apple"
> > fi
> >
> >
> I actually tried using grep admist my trial and errors, but guess I didn't
> get the syntax right.  :)

Heh, happens.  :(

I've occasionally written something, tested it, and then wanted
to smack myself.  The other day is a perfect example when I ran
two for loops together and was improperly looping.  :)

-- 
Tom Rhodes


More information about the wplug mailing list