01-23-04 09:52 PM
On Wed, 29 Oct 2003 00:18:03 -0800,
Tony <tony.wong@comcast.net> wrote:
[QUOTE]
Awk does not interpolate variable in strings unlike perl.
Do this
awk -F: 'BEGIN{print "#!/bin/sh"} {print "chown -R " $1 "." $1, $6}' /etc/pa
sswd
I prefer this to get the right group from the password file.
awk -F: 'BEGIN{print "#!/bin/sh"} {print "chown -R " $3 "." $4, $6}' /etc/pa
sswd
Also do remove the entries for system user names such root, bin, daemon,
or adm from the generated shell script. Mofifying the owner for any
files in the home directories of those users may have a devastating
result on your unix system.
Villy
[ Post a follow-up to this message ]
|