amblina / katacoda-scenarios

Katacoda Scenarios
https://www.katacoda.com/amblina
4 stars 8 forks source link

Tutorial 5, Step 3, Challenge 2 #25

Open simonv-nano opened 4 years ago

simonv-nano commented 4 years ago

This is the currently suggested challenge:

Print columns 1-3 in reverse order (column 3 then 2 then 1)

Hint cut doesn't care about which order you specify individual columns it just doesn't accept a range where the start number is bigger than the last.

Answer cut -d ',' -f 3,2,1 parks.csv

However the cut command cannot change the order of the columns so will continue to print the columns in the order 1, 2, 3

Maybe worth investigating paste