Hey Folks and Gurus there
I am trying to replicate this logic in bash :
(1) if [ "$var" = Uppercase (this value list e.g."t1",'t2") ] ; then
function1 parameters &
function2 parameters &
fi
Is there an easy method esp one with regex that can do this comparision.
e.g. $var is compared to this list ( case regardless ) ( 'foo','foobar','cheese burger' )
(2) how can I express precedence of operation in an if statement .
e.g.
if [ ( expression1 -a expression2 -o expression3 ) -o (expression4 -a expression5) ]
well how do I convey this . Round brackets are not allowed.
(3) Finally if I have a situation. where I am calling a function in a function :
f1()
{ blan }
f2()
{blah
Conditional logic here
f1 variable & # St1
f1 variable & # St2
}
main flow statement
I want to check when St1 and St2 both have completed and when that happens ( whenever. Remember they run in parallel - with an & )
I want to shell to do something.
How should I replicate this logic .
Thanks in advance .
Bye
Sam