5

problem in exit in same shell with echo

view full story
linux-howto

http://www.unix.com – Hello All, I am in SunOS usvh3eudv80 5.10. facing problem in my script: Code: #!/bin/bash var1=`date +"%m%d%H%M"%S.zip`   echo " Hi your current dir is :---> $(pwd)";echo " Changing to home dir:"   cd ~ 2>/dev/null || {echo "Change dir failed ....Quiting...." && exit 2 }; ls -lrt   echo "..... APPLICATION logs....." Here I want to check if cd fails then echo the msg and exit the script. But when I try to group with { } it says : Hi your current dir is :---> /home/tomcat1/Release_Inte Changing to home (HowTos)