Have a try
$ awk -F: '{print $1, $NF}' /etc/passwd
- | - | - |
---|---|---|
-F: |
Colon as a separator | |
{...} |
Awk program | |
print |
Prints the current record | |
$1 |
First field | |
$NF |
Last field | |
/etc/passwd |
Input data file |
Comments
$ awk -F: '{print $1, $NF}' /etc/passwd
- | - | - |
---|---|---|
-F: |
Colon as a separator | |
{...} |
Awk program | |
print |
Prints the current record | |
$1 |
First field | |
$NF |
Last field | |
/etc/passwd |
Input data file |