Operating System Shell Scripting/Programs on Linux
Linux Shell Scripting programs
Sunday, 17 June 2012
¬Write a shell script to check whether the file whose name is scanned exists and readable
read file
if [ -e $file ]
then
if [ -r $file ]
then
echo The file exists and readable
else
echo The file exist but not readable
fi
else
echo The file is not exist
fi
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment