How to extract fields from etc/passwd file?

view full story

http://www.unix.com – Hi! i want to extract from /etc/passwd file,the user and user info fileds, to a another file.I've tried this: Code: cut -d ':' -f1 ':' -f6 < file but cut can be used to extract olny one field and not two. maybe with awk is this possible? (HowTos)