--- Matt Johnson
--- Mark Evans
wrote: Hi all,
How would I write a script that only affected certain groups?
Trying to think of an example, how could I run:
rm /home/*/file_to_delete
only on the home directories of folk who belong to the 'pupil' group.
One command I run is find /home -name '*' -maxdepth 1 -exec cp /home/template/file_to_copy '{}'/new_file ';'
Can I build a "where user is in group 'pupils'" into that somehow?
Umm, I'm interested in solving this for you. My idea is to use a combination of "Sed", "Awk" (?) and the "Stat" command....leave it with me, I'll see what I can do. HTH, Thomas Adam ===== Thomas Adam "The Linux Weekend Mechanic" -- www.linuxgazette.com __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com