I am writing a bash script (.sh file) to run a program called "lenstool". Before fully running as I type directly in the terminal, "lenstool" opens a text file in vim. I must quit vim by typing :q and hitting enter. Then the program would do what it is supposed to do. Now, I want run "lenstool" a few thousand times. How can I automatically exit vim within a bash script file?