Reputation: 3440
I'm trying to do a simple sed
replace but I'm getting a strange result. I just want to take any of my conditions that end in .0_ and replace them with . However, something unexpected is occurring. It's eating anything of the form "x0". What do I need to change here?
$ cat test.csv
Ar_phi_2.5_eV_tOn_0.5_ns_tOff_20_ns_d_3.2_um_V_20_V,4586.516493
Ar_phi_2.5_eV_tOn_0.5_ns_tOff_20_ns_d_3.2_um_V_20.0_V,4586.516493
$ sed -i -- 's|.0_|_|g' test.csv ;
$ cat test.csv
Ar_phi_2.5_eV_tOn_0.5_ns_tOff__ns_d_3.2_um_V__V,4586.516493
Ar_phi_2.5_eV_tOn_0.5_ns_tOff__ns_d_3.2_um_V_20_V,4586.516493
Upvotes: 2
Views: 40