Hi,
As in scripting , some cd commands getting failed, so we do check the exist status as 0 or 1. But every time we call to function for it. But does any single line exist will do the job with || , && ? i.e
ls -l
Logs
cd Logss | exit
echo hi
as Logss is not exist , Before printing "hi" we have to exit with some friendly output i.e "directory is not exist"
@cero
it works fine for me. Thanks. Actually i missed the exit ;(semicolon) so failed to getting the exact result. @jim
Already i quoted same thing in my script but not working for me. So trying multiple combination of the Logical AND , OR and Bitwise AND, OR condition to achieve it.