diff --git a/docs/pages/bash_manip/bash_manip-6-awk.md b/docs/pages/bash_manip/bash_manip-6-awk.md index 796f480de84e90e92b7b0ac3be6a43261c6b63f1..e08333a5c88d8db504a61a4cd5f04a3f61b3242a 100644 --- a/docs/pages/bash_manip/bash_manip-6-awk.md +++ b/docs/pages/bash_manip/bash_manip-6-awk.md @@ -121,7 +121,7 @@ awk -v var="$my_var" '$2 == var { print $0 }' file.txt awk -F ';' 'NR > 1 {print $0}' nat2021.csv | head ``` -!!! question "Print second column of the file? In a second time try to remove redundancy (using `cut`, `sort` and `uniq`). In a third time count number of lines." +!!! question "Print second column of the file? In a second time try to remove redundancy (using `sort` and `uniq`). In a third time count number of lines." ??? example "Click to show the solution" @@ -131,12 +131,12 @@ awk -v var="$my_var" '$2 == var { print $0 }' file.txt ??? example "Click to show the solution without redundancy" ```bash - awk -F ';' '{print $2}' nat2021.csv | cut -d ';' -f 2 | sort -u + awk -F ';' '{print $2}' nat2021.csv | sort -u ``` ??? example "Click to show the solution without redundancy and with count" ```bash - awk -F ';' '{print $2}' nat2021.csv | cut -d ';' -f 2 | sort -u | wc -l + awk -F ';' '{print $2}' nat2021.csv | sort -u | wc -l # 36172 - this is the diversity of names in our file ```