I have a pipe delimited file as below
1 |Mike | 2000| 2|
2 |Peter | 4000| 2|
…..
…
…. and so on.
I want to remove the leading and trailing spaces between fields. It should look like as below
1|Mike|2000|2|
2|Peter|4000|2|
Is there any way in shell script to achieve this output?
Thanks,
Chandraa
You can try