Hands-on task
This task is step 8 of the course “awk and datamash: reports from tables”
awk: alignment via printf
/root/p.txt has two columns: a name and an age. Print them to /root/out.txt so that the name occupies exactly 10 characters, left-aligned, followed immediately by the age. The name field format is %-10s.
What you'll practise:
- awk
- printf
- output formatting
- field width