AWK/SED. How to remove parentheses in simple text file

后端 未结 6 2110
无人共我
无人共我 2021-02-07 11:14

I have a text file looking like this:

(-9.1744438E-02,7.6282293E-02) (-9.1744438E-02,7.6282293E-02)  ... and so on.

I would like to modify th

6条回答
  •  一生所求
    2021-02-07 11:26

    I would use tr for this job:

    cat in_file | tr -d '()' > out_file
    

    With the -d switch it just deletes any characters in the given set.

    To add new lines you could pipe it through two trs:

    cat in_file | tr -d '(' | tr ')' '\n' > out_file
    

提交回复
热议问题