In the script below, when the code inside the if statement is executed, the user gets logged out from bash. Why is this?
#!/bin/sh  
if [ -z $1 ]; then  
   echo "1"  
   read w  
   exit 1  
fi  
if [ "$#" -gt "1" ]; then
   echo "1"
  read w
  exit 2
fi
export PTSUSER=$1.
<some more code>
 
     
     
     
    