Bash script

view full story

http://nixcraft.com – Have got a homework (Shell script) which I tried my best to make it work, but in vain. Can anyone help.Question:Write a bash program named fix-permissions.sh that accepts a list of users as arguments.1- If one user or more are given as arguments, the script should reset file permissions as follows: a. Directory ~/share to 750 (if it exists). b. All regular files inside ~/share to 744. c. All directories inside ~/share to 750. d. All other regular files in ~ to 600 and all other directories in ~ to 700. e. files of other types are left as they are.We assume that there is only one level of files (HowTos)