Hands-on task
Parsing CSV by columns
In /root/people.csv the lines are of the form name,age,city. Write /root/names.sh that outputs only the names (the first column), and save the output to /root/names.txt. Skip the header line. Keep in mind: names may contain spaces, and the file's last line doesn't end with a newline.
- csv parsing
- ifs variable
- while read
- tail
- fields and separators