Skip to content
Advertisement

Tag: csv

Working with complex CSV from Linux command line

I have a complex CSV file (here is external link because even a small part of it wouldn’t look nice on SO) where a particular column may be composed of several columns separated by space. For viewing I am using this trick column -s,$’t’ -t < *.csv | less -#2 -N -S which is an upgraded version borrowed from Command

How to replace string with bash script and write back the Result

There is a CSV file with some columns, the first column is a 5 digit customer number, the other columns are separated with “;” Here is a example: If the first column is empty than I need to set the last given customer ID. The result should look like: Now I read the file linewise with bash script, and want

Sorting a tab delimited file

I have a data with the following format: Now I tried to sort the file based on the last field decreasingly. I tried the following commands but it wasn’t sorted as we expected. What’s the right way to do it? Here is the sample data. Answer Using bash, this will do the trick: Notice the dollar sign in front of

Advertisement