How do I remove double quotes from a string in Unix?

Khang Lê

New member
How do I remove double quotes from a string in Unix?
Answer
2 Answers
  1. sed ‘s/”//g’ removes all double quotes on each line.
  2. sed ‘s/^/”/’ adds a double-quote at the beginning of each line.
  3. sed ‘s/$/”/’ adds a double-quote at the end of each line.
  4. sed ‘s/|/”|”/g’ adds a quote before and after each pipe.
  5. EDIT: As per the pipe separator comment, we have to slightly change the command.
22 окт. 2015 г.
 

Tìm kiếm

Back
Top