Quote:
Originally Posted by Franklin52 Ok, what have you tried so far?
And what goes wrong?
Regards | well, by some research and trial n error i have solved most of the doubts to an extent ,
1)for the FAP problem , i did this, Code: echo -n "Enter Filename : " ; read fname ;
# check if file exists
if [ -e $fname ]
then
#display fap for owner
echo "Owner"
ls -l $fname|awk '{print $1 }' |tee temp | cut -c2-4
#display fap for group users
echo "Group"
cat temp | cut -c5-7
#display fap for other users
echo "Other"
cat temp | cut -c8-10
else
echo "FIle does not exist"
fi
the output is : Code: Owner
rwx
Group
r-x
Others
r--
Now, this is an acceptable output , but i want to print the words "Read" "Write" "Execute" instead of 'rwx'. If it were only for the owner , i could use the test command and -r, -w, -x options but that doesnt work for Group and Other users, how do i do that ? |