Signal9Signal9 — home
online
back to labs

Dojo: Pull the Last Column

EasyOne-Liner Dojo5 min
The brief

The CSV /root/records.csv has a varying number of comma-separated columns per line, but you only want the LAST field of each. In ONE line, write those last fields (one per line, same order) to /root/answer.txt.

cut can't easily grab 'the last one' when the column count varies — but awk knows the last field by name. Find it.

What you'll do
  • Write the last comma-separated field of each line of /root/records.csv to /root/answer.txt, in one line

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.