I have a script that prints:
dhcp-18-189-47-44:CE06_getting_new_fit myname$ ./find-duplicate-structures.sh custom_structures new_GS_calculation/selected/POSCAR_00* ../CE05-structures_recombined/enum-00135/POSCAR.ideal == new_GS_calculation/selected/POSCAR_0011 (RMSD = 1.15475827927e-06, max. displacement = 1.41428428091e-06) ../CE05-structures_recombined/enum-00146/POSCAR.ideal == new_GS_calculation/selected/POSCAR_0022 (RMSD = 1.16051714442e-06, max. displacement = 1.42835572031e-06) ../CE05-structures_recombined/enum-00150/POSCAR.ideal == new_GS_calculation/selected/POSCAR_0027 (RMSD = 3.40556388834e-16, max. displacement = 6.04819551804e-16) ../CE05-structures_recombined/enum-00151/POSCAR.ideal == new_GS_calculation/selected/POSCAR_0027 (RMSD = 4.01650747941e-16, max. displacement = 5.4726685759e-16) ../CE05-structures_recombined/enum-00163/POSCAR.ideal == new_GS_calculation/selected/POSCAR_0037 (RMSD = 1.99174954223e-06, max. displacement = 2.44948961046e-06) In internally the script looks like:
dirs=$1 shift while read dir do if [ -f $dir/POSCAR.ideal ] then poscar=$dir/POSCAR.ideal else poscar=$dir/POSCAR fi mg match --just-match $poscar $@ done < $dirs exit 0 The printing occurs at the line mg match --just-match $poscar $@
However, in my practice, I would like to remove everything to the right "==", i.e.:
rm new_GS_calculation/selected/POSCAR_0011 rm new_GS_calculation/selected/POSCAR_0022 rm new_GS_calculation/selected/POSCAR_0027 rm new_GS_calculation/selected/POSCAR_0037 How could I automate this process in shell script? Thank you .