mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Merge pull request #430 from tanducmai/fix-ordinal-numbers
docs: fix ordinal numbers '1th' and '2th'
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -171,14 +171,14 @@ Awk Variables
|
||||
|---------------------|------------------------------------|
|
||||
| `$1 == "root"` | First field equals root |
|
||||
| `{print $(NF-1)}` | Second last field |
|
||||
| `NR!=1{print $0}` | From 2th record |
|
||||
| `NR!=1{print $0}` | From 2nd record |
|
||||
| `NR > 3` | From 4th record |
|
||||
| `NR == 1` | First record |
|
||||
| `END{print NR}` | Total records |
|
||||
| `BEGIN{print OFMT}` | Output format |
|
||||
| `{print NR, $0}` | Line number |
|
||||
| `{print NR " " $0}` | Line number (tab) |
|
||||
| `{$1 = NR; print}` | Replace 1th field with line number |
|
||||
| `{$1 = NR; print}` | Replace 1st field with line number |
|
||||
| `$NF > 4` | Last field > 4 |
|
||||
| `NR % 2 == 0` | Even records |
|
||||
| `NR==10, NR==20` | Records 10 to 20 |
|
||||
|
||||
@@ -213,7 +213,7 @@ std::array<int, 6> marks = {92, 97, 98, 99, 98, 94};
|
||||
// Print first element
|
||||
std::cout << marks[0];
|
||||
|
||||
// Change 2th element to 99
|
||||
// Change 2nd element to 99
|
||||
marks[1] = 99;
|
||||
|
||||
// Take input from the user
|
||||
|
||||
Reference in new issue
Block a user