Hi All,
Here is a small piece of code. I wish to process the first file in a directory.
TOPROCESS=`ls -1 sops* | sort | head -n 1`
Now the problem is that if the is no sops* file in the directory the shell script exits with the error.
How to handle this so that, TOPROCESS variable just remains empty if sops* does not exist. I want to let the script exit gracefully by checking the contents of TOPROCESS after the above is handled.
Regards
Kapil
_______________________________________________ ilugd mailinglist -- [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/