I have a long busybox ash script that has 3 stages.
1. Identify and Capture information on variable data sources, output the information to text file on each data source.
2. Using data from 1 above now actually do data processing on each individual dataset.
3. Produce report.
So stage 1 detects what data sources are currently live, stage 2 then process's data on each source and stage 3 gives the report on number of sources and each source.
Stage 2 can take literally hours on one data source and the application allows for saving current state to allow it to be stopped and continued later.
Therefore I've written the script to allow the job(s) to run but with a CTR-c function script that allows the user to either kill the whole job, or to kill just the current dataset.
However this function script is falling over and I can't see why.
Here's the function script....
Here's the script section that calls the function
Here's the output I'm getting when I press CTR-c
I'm guessing the issue maybe to do with the continue 2 command in the script (the trap call happens inside a double loop that loops till a condition is met that moves the script onto the next dataset)
All helpful ideas appreciated.....
Last edited by tesser; 08-23-2012 at 11:12 AM..
Reason: typo
Hi
I am quite new to scripting and cannot work out how to do the following -
I want to pipe to a log file and then use the "last statement error" in an if statement after, and this doesn't work because it checks the pipe statement instead of the script.
Example:
executteTheScript $var |... (4 Replies)
Hi All,
Please hav a look at the below peice of script and let me know if there are any syntax errors.
i found that the below peice of Script is causing issue. when i use SFTP its working fine, but there is a demand to use FTP only. please find below code and explain if anything is wrong... (1 Reply)
I have a variable strLst containing a list of strings. I want to create a function that takes the list and an error message. If the number of strings is 0 or greater than 1, I print the error message. (1 Reply)
Hi all, Just want to say thanks for the great forum you have here, the old topics and posts have helped tremendously. So much so that I have managed to figure a lot out just by researching. However, I'm having a small issue that I simply can't find the answer to. (4 Replies)
I am using mailx command to send emails from the Unix command prompt. Whenever email is not sent it is not giving me any message "Email not sent" or failure delivery notice for the wrong email addresses. When I give correct email address I am able to receive them correctly.
Can anyone please... (0 Replies)
Hi All,
Background: We use SendMail function (given below) to send emails to users. The email address are obtained as ouptut of a stored procedure in sybase.
We have defined a SendMail function as below in a .pm file and it is used in a .pl script.
Code Snippet:
sub SendMail
{
... (1 Reply)
I have shell script as below:
#!/bin/ksh
#set -xv
function set_variable
{
VARIABLE_NAME=$1
CURRENT_PATH=`pwd`
if ; then
echo "\nconfiguration_file.lst file not found in $CURRENT_PATH/common/common_scripts"
exit 1;
fi
VARIABLE_COUNT=`cat... (2 Replies)
Hello World ~
HW : SUN Fire V240
OS : Solaris 8
Error message prompts 'rmclomv ... SC login failure ...' on terminal.
and
Error Message prompts continually 'SC Login Failure for user Please login:' on Single Mode(init S)
The System is in normal operation, though
In case of rain, Can... (1 Reply)
Hi there
I have a box that at 4pm started recieving soft errors on a DIMM, normally this is ok and we have time to swap it out. But I got the following error which caused the box to reboot
NOTE: there were abount 6 or 7 normal "soft error encountered" messages before this one
Nov 7... (1 Reply)
Hi there, I have upgraded my explorer (SUNWexplo) on a solaris 10 Sparc box from version 3.4 to the latest version (5.5) . However im a little concerned, whenever I run the new explorer either manually or scheduled, I get a syslog event as follows
1 in 0:08:31: Sep 22 17:00:15 fmy.machine.com... (8 Replies)