how to remove spaces and double quotes and number ending dot using sed command [closed]

Multi tool use
Multi tool use


how to remove spaces and double quotes and number ending dot using sed command [closed]



I need to remove space before and after the | symbol and number ending | before dot
and string have double quotes.



example :


shyam|abhi"|ee d|453223.|shuyb



should become :


shyam|abhi|eed|453223|shuyb



please suggest me how to do using sed linux command.



Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.





what did you try? what worked and what didn't work?
– sathyz
Jul 2 at 5:27





space remove is working using this command sed 's/[[:space:]]*|[[:space:]]*/|/g' text and double quote also working sed -e 's/"//g' test.csv > test1.csv only thins is i need to remove period before | symbol. also please suggest only one single command to remove these all things.
– Vittal Cherala
Jul 2 at 5:30






@VittalCherala please click edit and add those details to question
– Sundeep
Jul 2 at 6:29





Please avoid "Give me the codez" questions that have been asked and answered so many times you have to make an effort to avoid finding an answer. Also see How much research effort is expected of Stack Overflow users?
– jww
Jul 2 at 6:54





I resolved using this sed commnad. This command worked only deleted dot symbol near | symbol. sed 's/.|/|/g' b1.csv > v4.csv 11987.| it came 11987|
– Vittal Cherala
Jul 2 at 11:08





1 Answer
1



You can specify a list of characters to be removed using basic regex, remember to use global substitution in your case.


$ sed 's/[" .]//g'
shyam|abhi"|ee d|453223.|shuyb
shyam|abhi|eed|453223|shuyb





Thanks sathyz. it's working.
– Vittal Cherala
Jul 2 at 6:54






Also Sathyz, in number there is decimal dot (1234.00) but that should not remove, only trailing dot need to remove( 09989.|)
– Vittal Cherala
Jul 2 at 7:08

LQrIKJcX0hEpBgCzEhJdjC D,ir6LPGKK4hSnt7PlOLVgsD0AUe4pqJ9YmAlJ9QrVVI jkfOd0dw
3xzBmwvwEqbi kluMaq Bahjb,Sawi,7sp15PpPbRSU1s,7i1LwqZjTf9TXdF9AqLNZW7IEGh6FB8NjeT1Leb8Jjat

Popular posts from this blog

Rothschild family

Cinema of Italy