just type the command and it will be executed:
#!/bin/bash
ls -l
if you want to run other shell scripts use:
sh otherShell.sh
or for executable files:
. otherShell.sh
gnuplot is as other commands, you can use it inside shell script:
Example:
#!/bin/sh
lib=$1
old="output/old/$lib.dat"
new="output/new/$lib.dat"
gnuplot << EOF
set logscale x
set logscale y
set size square
set grid
set pointsize 1
plot "< paste $old $new" using 1:4 ti '$lib'
EOF
for the problem "it was giving no time for view and interaction with the GUI launched within the application":
you can tell gnuplot to print the plot to file, which you can open up and view yourself:
plot '<SOME FILE>' .......
Or you need to invoke gnuplot with a flag:
gnuplot --persist
to ensure that plots stay up after gnuplot quits.
Sources:
automate gnuplot plotting with bash
http://www.unix.com/shell-programming-and-scripting/146860-using-variables-gnuplot-within-shell-script.html