To print the first word of each line of a file
awk '{print $1}' filename
If the file is colon delimited, use -F:
awk -F: '{print $1}' /etc/password