Not able to assign 0 (zero) to the existing variable

view story

http://www.unix.com – Hi, I have a variable which read the value from the lines, and if it is empty string (5 bytes), then I have to assign this variable to zero "0", it able to detect the data is empty by showing me the message "empty", but not able to assign it as zero. Code: WTHP=`echo "$file" | cut -c158-162`   if [[ $WTHP = " " ]] then echo "empty" >> $Log $WTHP = 0 echo "$WTHP=" $WTHP >> $Log fi it will show me error message "not found". I have tried to code it as below: 1) WTHP = 0 OR 2) WTHP = [0] OR 3) WTHP = & (HowTos)