The FreeBSD Corporate Networker's GuideDifferent awk scriptFor the awk script: awk -F, '{print $1":"$2":"$3":"$4"::0:0:"$5":"$6":"$7}' <passwd.csv>master A reviewer sent in the following better replacement: awk 'BEGIN {FS=","; OFS=":"} {print $1,$2,$3,$4,"",0,0,$5,$6,$7}' This is better and more efficient. However, I maintain that it's harder for the newbie to awk to understand what's going on.
© Copyright 2000-2003 Ted Mittelstaedt. All rights reserved. |