Sun Jul 01, 2012 4:05 pm
Tue Jul 03, 2012 2:37 am
sed: can't read ^home^minnow^.gconf^apps^gksu^%gconf.xml: No such file or directory
Tue Jul 03, 2012 3:53 am
Tue Jul 03, 2012 11:10 am
meandean wrote:I also noticed another error. If you cat ^etc^passwd you will see that the $newname is added to a number of accounts.
# Change user's real name
live_user=$(awk -v pattern="$newname" -F: '$0 ~ pattern { print $5 }' ^etc^passwd) # (using your nomenclature: ^==/)
echo -n "
The user's real name is currently $live_user.
Enter the real name you want to use (without the trailing commas.)
"
read real_name
sed -i~ "s^$live_user^$real_name,,,^" ^etc^passwd
# Change user's real name
live_user=$(awk -v pattern="$newname" -F: '$1 ~ pattern { print $5 }' ^etc^passwd)
echo -n "
The user's real name is currently $live_user.
Enter the real name you want to use (without the trailing commas.)
"
read real_name
sed -i~ "s^$live_user^$real_name,,,^" ^etc^passwd