0

I'm trying to replace patterns in csv files that are too large to open with excel,

I'm trying to perform the following,

  • Remove all " chars
  • Replace (ROI ) with (ROI)
  • Replace (NI ) with (NI)
  • Remove all @ Chars
  • Remove all & Chars
  • Remove all Tab Chars

I have tried

sed 's/"//' | sed 's/ROI  /ROI/' | sed 's/NI  /NI/' | sed 's/@//' | sed 's/&//' | sed 's/chr[09]//' file.csv > file.csv2

Can this be done?

Ben

4

1 回答 1

2

这可能对您有用(GNU sed):

sed 's/["@&\t]//g;s/(\(ROI\|NI\) )/(\1)/g' file
于 2013-06-24T12:14:14.000 回答