How to remove these symbols with sed

Viewed 43

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 ?

1 Answers

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.

Related