File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,11 @@ DESCRIPTION
8585* ` $1 ` contains the first field text
8686 * default input field separator is one or more of continuous space, tab or newline characters
8787* ` $2 ` contains the second field text and so on
88- * ` $NF ` points to last field
89- * ` NF ` is built-in variable and can be used in expressions
90- * ` $(NF-1) ` points to second last field and so on
88+ * ` $(2+3) ` result of expressions can be used, this one evaluates to ` $5 ` and hence gives fifth field
89+ * similarly if variable ` i ` has value ` 2 ` , then ` $(i+3) ` will give fifth field
90+ * ` NF ` is a built-in variable which contains number of fields in the current record
91+ * so, ` $NF ` will give last field
92+ * ` $(NF-1) ` will give second last field and so on
9193
9294``` bash
9395$ cat fruits.txt
You can’t perform that action at this time.
0 commit comments