I have lines of codes all of which look similar. Giving some examples below
gmx trjconv -s md_0_10.tpr -f md_0_10.xtc -o md_0_10_center.xtc -center -pbc mol -ur compact
gmx trjconv -s md_0_10.tpr -f md_0_10_center.xtc -o start.pdb -dump 0
gmx trjconv -s md_0_10.tpr -f md_0_10_center.xtc -o md_0_10_fit.xtc -fit rot+trans
gmx trjconv -s md_0_11.tpr -f md_0_11.xtc -o md_0_11_center.xtc -center -pbc mol -ur compact
gmx trjconv -s md_0_11.tpr -f md_0_11_center.xtc -o start.pdb -dump 0
gmx trjconv -s md_0_11.tpr -f md_0_11_center.xtc -o md_0_11_fit.xtc -fit rot+trans
gmx trjconv -s md_0_12.tpr -f md_0_12.xtc -o md_0_12_center.xtc -center -pbc mol -ur compact
gmx trjconv -s md_0_12.tpr -f md_0_12_center.xtc -o start.pdb -dump 0
gmx trjconv -s md_0_12.tpr -f md_0_12_center.xtc -o md_0_12_fit.xtc -fit rot+trans
So essentially using Control
+ R
just narrows down to this bunch of similar lines. But essentially I will have to evade through these bunch of similar lines to narrow down to the final one. I was thinking of some tricks.
echo 10step1 | gmx trjconv -s md_0_10.tpr -f md_0_10.xtc -o md_0_10_center.xtc -center -pbc mol -ur compact
echo 10step2 | gmx trjconv -s md_0_10.tpr -f md_0_10_center.xtc -o start.pdb -dump 0
echo 10step3 | gmx trjconv -s md_0_10.tpr -f md_0_10_center.xtc -o md_0_10_fit.xtc -fit rot+trans
echo 11step1 | gmx trjconv -s md_0_11.tpr -f md_0_11.xtc -o md_0_11_center.xtc -center -pbc mol -ur compact
echo 11step2 | gmx trjconv -s md_0_11.tpr -f md_0_11_center.xtc -o start.pdb -dump 0
echo 11step3 | gmx trjconv -s md_0_11.tpr -f md_0_11_center.xtc -o md_0_11_fit.xtc -fit rot+trans
echo 12step1 | gmx trjconv -s md_0_12.tpr -f md_0_12.xtc -o md_0_12_center.xtc -center -pbc mol -ur compact
echo 12step2 | gmx trjconv -s md_0_12.tpr -f md_0_12_center.xtc -o start.pdb -dump 0
echo 12step3 | gmx trjconv -s md_0_12.tpr -f md_0_12_center.xtc -o md_0_12_fit.xtc -fit rot+trans
After running these codes once. For re-running the code again, I use Control + R
reverse search and then I put the string 10step1
or 12 step3
I wish to ask if there are other tricks which can make this process more efficient during searching and narrowing down of the required line quickly
I went through similar history search related questions in other post but they are in general and does not deal with the problem of navigating through similar lines of code.
# keyword
and search for keyword. – Cyrus Jun 13 '20 at 17:56