Hi,
Earlier I have mentioned the command wrongly.
Input:
$ cat samp
1234 "6734" "DSS" "8887578384" "ABC PRIVATE LMT REGNO 6" 3245
Output of the unix command:
$ sed -e 's/ / /g' -e 's/ /|/g' -e 's/\("[^"|][^"|]*\)|\([^|][^|]*|\)\([^"|][^"|]*|\)/\1 \2 \3/g' samp
1234|"6734"|"DSS"|"8887578384"|"ABC PRIVATE| LMT|REGNO|6"|3245
Desired output:
1234|"6734"|"DSS"|"8887578384"|"ABC PRIVATE LMT REGNO 6"|3245
Also just would like to know if we can handle it dynamically? To be more clear now there are 4 spaces ("ABC PRIVATE LMT REGNO 6") with in the string. In case if we have more spaces how can this be handled?
Please clarify..
Thanks
Dude