HI Catkin thanks for your response but I am so confused!
Here is an example of my files:-
so my bacula.sh file
#! /bin/bash
Vol=$(echo "st storage=DEV6-Changer" | bconsole | grep Volume: | cut -d':' -f2)
echo $Vol
/etc/bacula/bconsole -c bin/bconsole.conf </bin/baculacommands.sh
exit 0
For my baculacommands.sh file i have something like:-
mount
purge
3
8
I just want to add the $Vol name that I have found from my first file to the bottom of my second file - but am clueless as to how to pass the variable to this file...
Hope this is clearer...