Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to remove these symbols with sed

Upon executing curl I get this kind of a response:

Timestamp:2022-09-19T09:43:15 \n
No:12 \n
Name: Provide a short description \n
Author:jsimpson \n
Description# Description\r\n\r\nThis is the description \r\n\r\n##Provide additional information.\r\n- [X] Address\r\n- [ ] Phone\r\n \n
\r\n
--- \n

How can I remove the following characters using sed command? #, [, ], \r ?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Construction like this can help you to remove these symbols:

sed 's/#//g; s/\[//g; s/\]//g; s/\\r//g' 

it is just sequence of changes. Be aware some symbols need to be escaped.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading