Write a linux shell program to perform set the attributes of a given file

To set the attributes of a given file

Code:

clear 
echo --------------------------------------------- 
echo '\tSetting The Attributes of A File' 
echo --------------------------------------------- 
echo Enter the name of the File 
read filename 
if chmod +x $filename 
then 
        echo Successfully run mode attribute was set for file. 
else 
        echo Attribute not set for file. 
fi 

Output:

--------------------------------------------- 
Setting The Attributes of A File 
--------------------------------------------- 
Enter the name of the File 
sat
Successfully run mode attribute was set for file. 

No comments

Powered by Blogger.