Home Linux Write a shell script to display the permissions of the particular file.

Write a shell script to display the permissions of the particular file.

44 second read
0
0
20

Write a shell script to display the permissions of the particular file.


echo "Enter the filename"

read fname

if [ -r $fname ]

then

echo "The $fname is readable"

elif [ -w $fname ]

then

echo "The $fname is writable"

elif [ -x $fname ]

then       echo "The $fname is executable"

else

echo "The $fname is not readable,writable and executable"

fi

Load More Related Articles
Load More By coder coder
Load More In Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

Prime Or Not Prime vb.net Program.

Prime Or Not Prime . …