#!/opt/local/bin/kermit + for i 1 \v(argc) 1 { if not def \&_[i] break if link \&_[i] continue xecho \&_[i]... .perms = 644 if directory \&_[i] .perms = 755 chmod \m(perms) \&_[i] if fail exit !chgrp kermit \&_[i] if fail exit echo OK } exit 0 Done.