|
|
|
|
|
by fwip
2209 days ago
|
|
Anyone used to command-line tools is used to fields being 1-indexed. awk uses $0 as the whole line, and $1 as the first field.
cut uses -f1 as the first field
$1 is the first argument to a posix shell script
/1 is the first matched reference in a sed
$1 is the first regex match in perl A command-line tool being 0-indexed breaks from expectation of what everybody is used to using on the command line. |
|