I have a script which opens a file, modifies it, and saves the contents to a new file. The new file must have the same permissions as the original. The original file is located with the find command:

fine . -name '*.cfm' -print | while read i
do
  # fix the file
  sed 's#/library#/Library#g' $i > $i.tmp && mv $i.tmp $i
  chmod <original permissions> $i
done

So how can I find out what the permissions of $i are before it's altered, so that I can reset those permissions when the manipulation is complete?

_______________________________________________
Solaris-Users mailing list
[EMAIL PROTECTED]
http://www.filibeto.org/mailman/listinfo/solaris-users

Reply via email to