Whenever I begin a data-manipulation session I have to manually open two terminals - one to work in, and another that runs gnuplot so I can quickly load a plot program to see the results.
Both are opened in the same directory /home/pi/python, where the data is constantly automatically logged and available for analysis.
To minimize typing I have created a script called pj that I've put into /usr/sbin (in my $PATH) that contains
#!/bin/bash cd /home/pi/python
I invoke it by typing
. pj (notice the space so when it exits it stays there)
Then I have to click to open a second terminal window where I run a script gp that contains the following commands:
#!/bin/bash cd /home/pi/python gnuplot
This one I invoke with
notice no dot before the command because I don't care what happens when it eventually exits - I tend to leave it open all day.
Is there a way in bash to have one command do both for me?
The question is in the title: can I open two interactive terminal windows in a single script?
Put simply, I would like one command to open two terminal windows into the same subdirectory, with one of them running gnuplot in interactive mode and the other sitting at the bash prompt.