Open simonv-nano opened 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
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
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