Hi,
I need to write a shell script for changing the permissions for certain files in our system (example all files with extension .rpt). The script has to generate a backup script which will have chmod command to change the permissions back to the original. I have written upto a point that I use "find" command to find the files and save the output in a .lst file and do an ls -l on each line in the file after looping and using awk to get the original permission of format (rwxr-x---). This is available in a variable now. I am stuck here. How could I generate the chmod command while looping through the above string (stored in the variable). Any help??
Thanks in advance,
onceagain
I need to write a shell script for changing the permissions for certain files in our system (example all files with extension .rpt). The script has to generate a backup script which will have chmod command to change the permissions back to the original. I have written upto a point that I use "find" command to find the files and save the output in a .lst file and do an ls -l on each line in the file after looping and using awk to get the original permission of format (rwxr-x---). This is available in a variable now. I am stuck here. How could I generate the chmod command while looping through the above string (stored in the variable). Any help??
Thanks in advance,
onceagain