I am trying to remove spaces and tabs from csv file. (In Linux via command line)
sed "s/[[:blank:]]\{1,\}//g" ./TRIM.csv
By using the above command, the space between value/item of a column is removed.
(Eg. Hello World is becoming HelloWorld)
Also I want to replace '|' with '~'
SAMPLE FILE:
0 | null | 0 | 0 | 0 | null | null |
1 | Hello World | 0 | 0 | 0 | null | null |
Desired output :
0~null~0~0~0~null~null~
1~Hello World~0~0~0~null~null~
All spaces have been removed except the space between 'hello world' which is value of column that has space.