You can also use this:
perl -wlne 'print join " ", (split /:/)[0, 4]' /etc/passwd [download]
In reply to Re^2: printing passwd file by ambrus in thread printing passwd file by madmonster99