include ("header.inc"); ?>
|
The basic function of awk is to search files for lines or other text units containing one or more patterns. When a line matches one of the patterns, special actions are performed on that line. Display user names from /etc/passwd (field 1):
Display user names home directories and login shell (fields 1 and 7): and store them in a separate file, users.txt
Default field separator is empty space. To print users (field 1) from just created file users.txt:
Recommended tutorial: The GNU awk programming language include("right-side-menu.inc"); ?> |