Tuesday, January 9, 2024

Program 1 B.Sc Computer Science with Data analytics Linux and Shell Programming - Lab Bharathiar University 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.

 

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

Program 12 BCA Madras University BCA Object Oriented Programming using C++ Practical Madras University Program 12 Implement a telephone directory using files

  BCA Object Oriented Programming using C++ Practical Madras University  Program 12  Implement a telephone directory using files SOURCE CODE...