syntax of nested if -else,lookup and match

November 22, 2010 at 05:28:55
Specs: Linux i686
what is the syntax of the functions nested if -else, lookup and match

See More: syntax of nested if -else,lookup and match

Report •


#1
November 22, 2010 at 10:16:50
You question is vague. Since you are using Linux, I am assuming you are asking about the bash shell?

Below is an example of a nexted if statement, but I don't know in what context you are asking about "lookup" and "match":

#!/bin/bash

x=5
y=z
if [[ $x -eq 5 ]]
then
   if [[ "$y" == "z" ]]
   then
      echo "x is 5 with y equal z"
   fi
else
   echo "x does not 5"
fi


Report •
Related Solutions


Ask Question