Hands-on task
This task is step 2 of the course “awk and datamash: reports from tables”
awk: count the lines
Count the number of lines in /root/nums.txt and write the resulting number to /root/count.txt. This is an awk task — try to do it without wc.
What you'll practise:
- awk
- NR variable
- END block
- output redirection
- counting lines