Skip to main content
Fixed formatting
Source Link
Allan
  • 104.3k
  • 33
  • 206
  • 469

Using the -i option for sed is courageous, but also dangerous. I would recommend the following:

sed -e 's/"|"/|,"/g' filename > tmp

sed -e 's/"|"/|,"/g' filename > tmp

Then, check that the file tmp is formatted as you wanted it to be. If it is ok, then you can replace the original file with tmp:

mv tmp filename

mv tmp filename

Using the -i option for sed is courageous, but also dangerous. I would recommend the following:

sed -e 's/"|"/|,"/g' filename > tmp

Then, check that the file tmp is formatted as you wanted it to be. If it is ok, then you can replace the original file with tmp:

mv tmp filename

Using the -i option for sed is courageous, but also dangerous. I would recommend the following:

sed -e 's/"|"/|,"/g' filename > tmp

Then, check that the file tmp is formatted as you wanted it to be. If it is ok, then you can replace the original file with tmp:

mv tmp filename
Source Link

Using the -i option for sed is courageous, but also dangerous. I would recommend the following:

sed -e 's/"|"/|,"/g' filename > tmp

Then, check that the file tmp is formatted as you wanted it to be. If it is ok, then you can replace the original file with tmp:

mv tmp filename