-----------------------------Script--------------------------- str=`ls -l $1` echo "file Name : " $1 set -- $str echo "File permissions : " $1 echo "Number of links : " $2 echo "Owner of the file : " $3 echo "Group : " $4 echo "Size of file : " $5 -----------------------------output--------------------------- file Name : out.sh File permissions : -rwxrwxrwx Number of links : 1 Owner of the file : dca19 Group : dca19 Size of file : 242 -----------------------------END------------------------------
Home
Shell Script
shell script for The script will receive the filename or filename with its full path. The script should obtain information about this file as given by "ls -l" and display it in proper format. e.g. - Filname : , File access permission : , Number of links : , Owner of the file : , Group to which belongs : , Size of file : , File modification date : , File modification time : sh sh6.sh out.sh
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment