How can I automatically exit vim via a bash command in a .sh file? - Ask Ubuntu
i writing bash script (.sh file) run program called "lenstool". before running type directly in terminal, "lenstool" opens text file in vim. must quit vim typing :q , hitting enter. program supposed do. now, want run "lenstool" few thousand times. how can automatically exit vim within bash script file?
one solution comes mind doing:
id=$(ps -a | grep vim | awk '{print $1}')
to pid(s) of running vim program(s) , kill with:
kill $id
of course need save work first , this. i'm not sure how program saves has done!
Comments
Post a Comment