B.Sc Computer Science with Data analytics
Linux and Shell Programming - Lab
Bharathiar University
Program 1
Program 1- Write a Shell script that displays list of all the files in the current directory to which the user has read, write and execute permissions.
SOURCE CODE:
echo "Files with read, write and execute permissions"
echo "===================================="
for file in *; do
if [ -r $file ] && [ -w $file ] && [ -x $file ]; then
echo $file
fi
done
Sample Output:
No comments:
Post a Comment