5

Optimize the nested IF

view full story
linux-howto

http://www.unix.com – Hi, I have to assign a value for a varaiable based on a Input. I have written the below code: Code: if [ "$procnam" == "admission" ]  then   nf=65 elif [ "$procnam" == "reporting" ]  then   nf=46 elif [ "$procnam" == "transfer" ]  then   nf=164 elif [ "$procnam" == "diagnosis" ]  then   nf=545 elif [ "$procnam" == "emergeny" ]  then   nf=56 elif [ "$procnam" == "inpatient" ]  then   nf=37 else exit 0 fi Can som (HowTos)