The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-02-2009
badrimohanty badrimohanty is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 17
if conditional statement

Hi,

I have a script like this:
sample.sh

mapping=$1
if [ "$mapping" =="pass" ]
then
echo "program passed"
fi

I'm running the above script as ./sample.sh pass

The script is not getting executed and says "integer expression expected"

Could anyone kindly help me?