So how do you know your scripts have finished? You are simply getting the return code from the submission of a background job. I think you need something more like:-
Note the extra spaces in the if statement between the square brackets and the values. This might not apply in your shell, but it's a good bet it does looking at your message. Pretty basic stuff, but easy to get wrong.
This is a bit of a clunky way to do it, but this way will wait for both to complete before you get an answer. Is that okay? Be careful that there are no other background tasks, or it will wait for them too.
If you need to know as soon as one finished, there are ways to look at that, but hopefully the simple way will work for you.
Another way might be a co-process, but I'm not so good with them.
I hope that this helps,
Robin
Liverpool/Blackburn
UK
o
hola..
Tengo un script que se ejecuta bajo una tarea del CronJOb del unix, tengo la version 11 de unix, mi script tiene un ciclo que lee unos archivos .txt luego cada uno de esos archivos debe pasar por un procedimiento almacenado el cual lo tengo almacenado en mi base de datos oracle 10g,... (4 Replies)
Guys,
i am facing a very strange issue, my code below does an ftp to server A and gets a file to Server B, once the file is in B an if condition is present to check if the pattern of the filename is ABC* then it has to be encrypted using OPENSSL as ABC.enc else if it of pattern 123* has to be... (3 Replies)
Guys,
How can we know whether a script has been executed successfully or not ?
We dont have any log directories, and we are not given a chance to modify the script. Could someone help me out with this Thanks (2 Replies)
Hi guys,
I have a scenario where i want to run a script from Node A. It ssh's into Node B and runs some awk commands there plus deposiriting the output on Node B.
Challenge is that the awk commands run properly when executed locally on Node B but fail when within the script on Node B. I do not... (0 Replies)
Hi All,
First time poster, I hope I have the basics covered.
I am trying to execute a .sh but finding I am getting inconsistent results. A fresh set of eyes would be great.
I am using Solaris 10 zones.
So I am trying to execute a script but I am getting different results between... (2 Replies)
Hi
I have a bash script which takes parameters
sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC
gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters. Its working superb from bash
I have... (0 Replies)
Hai guys
I am running three shellscripts through Gtk2-Perl(GUI)
these are the scripts
Drccalibrescript1 script2 script3
Gtk2-Perl(GUI)
drccalibre -> If I run this script through Gtk2-Perl(GUI)
these are results of the drccalibrescript1 . summary/.results
I have to find size of... (1 Reply)
Hi All,
I have written the following code
do
FILE_NO=$(echo $LINE|awk -F"|" '{print $1}'|tr "'" '+'|sed 's/\(.*\)\(++\)\(.*\)\(++\)/\3/')
INST_NO=$(echo $LINE|awk -F"|" '{print $2}'|tr "'" '+'|sed 's/\(.*\)\(++\)\(.*\)\(++\)/\3/')
if ]
then
... (3 Replies)