Hi ,
I have a file which is like below. The file record is separated by |
as delimiter. I want to remove the first and last |
in the file and also I want to remove the spaces in the columns.
Original File
|3464114 |10 | REPORT|CA| 1|0|4825400|0|213167| 939396524|
Expected:
3464114|10|REPORT|CA|1|0|4825400|0|213167|939396524
I tried below sed and getting the |
delimited removed from first and last . But I need to remove space too. For some reason I am not getting expected out on big file with the below command:-
#sed -n '/^| */{s///;s/ *| */|/g;p;}' file.out > format.out