terminal
Welcome to Linux Practice Terminal!
Type "help" to see available commands.
user@linux:~$
awk - Text Processing
Learn to extract and process structured text data with awk.
Step 1
Use awk to print just the first field (word) from each line of names.txt.
Type: awk '{print $1}' documents/names.txt
awk '{print $1}' documents/names.txt
Step 2
Use awk with -F to set comma as field separator and print the second column of sales.csv.
Step 3
Use awk with a pattern to find lines containing "ERROR" in access.log.
Step 4
Use awk with NR > 1 to skip the header row of sales.csv.
Step 5
Combine NR with field references to print line numbers with product and quantity from sales.csv.
Step 6
Use a BEGIN block to print a header before processing lines.