Thank you guys, all of you have given very relevent and precise answers to my query.
although i am a J2EE app developer, and some how i am into UNIX now and that was first shell script, so i had lot of doubts, and u guys cleared it now.
joeyg,
reason being i was doing ls -ld directory_name is, if there is a directory then it gives exit staus 0 and if not it gives 1, based on this value i was creating a directory.
but
era, is write pipeline is treated as command by shell and if it is feeded to "if" statement it always gives exit 0.
thanks era.
Franklin52
i am making a Debian package to install and configure sun directory, opensso, openssl, so there i have to check at some places whather directory exists or not if not then i have to make it for the installation purposes.
thanks guys, i will look forward to your valuable help again.
cheers bye.