You didn't specify what operating system or shell you're using, but the following should work with any shell based on Bourne shell syntax (including, but not limited to, ash, bash, dash, ksh, and zsh):
I have two scripts:
SCR1 which takes between 5 seconds to 15 minutes and needs to be run every 23 minutes.
SCR2 which needs to be run every 5 minutes but only if SCR1 is not running at that moment.
How can I do this task?
Best Regards
/Hamid (3 Replies)
Does anybody experiencing this same problem?
I am using IRIX64 ver 6.5 at work.
I wrote some Perl scripts and to execute it.
First I try to put the Perl script at:
/$HOME/bin/perlscript
then I set the correct executable 755 right to the file
I make sure the PATH to the executable... (2 Replies)
Hi, I'm pretty new to Unix and I just have a question concerning making a script executable without putting the "sh" command before it. In case it makes the difference I am on an Apple computer using the Terminal. Anyway here is the little test code I wrote followed by the commands I took to try... (1 Reply)
Hi All,
I have 3 shell scripts, Script1,Script2 and Script3. Now I want to run Script1 and Script2 in parallel and Script3 should depend on successful completion of both Script1 and Script2.
Could you please suggest an approach of acheiving this...
Thanks in advance (2 Replies)
Hi,
Test1.ksh
#! /bin/ksh
for i in $*
do
#echo "$i"
ksh test2.ksh $i &
done
test2.ksh
#! /bin/ksh
sleep 5s
echo "From Test 1 ==> $1"
exit 0;
I am executing as follows:
ksh test1.ksh a b c (10 Replies)
Hi,
I am new to shell programming. I am trying to automate setting up a network using several scripts. Some of the scripts require to reboot in order to continue with the setup. Is it possible to enter another script as soon as the system reboots. Also, if the last line of the script is bash... (7 Replies)
First i need to find all scripts directly under /DIR that end with ".sh" extension except "noallow.sh". That can be done with:
find /DIR -maxdepth 1 -name "*.sh"|grep -v "noallow.sh"
Now i want to run all the files output from the previous command.
The following code:
for filename in... (6 Replies)
Hi there,
And happy new year to everyone.
I was wondering how is set the default shell for executing scripts.
I mean when the first line of a script file is not
#!/bin/bashThen what shell will be used to execute the script?
I thought the script file would be parsed using the current shell... (6 Replies)
Hi Folks -
Happy Thursday!
I have a need where I have Parent/Control script that calls multiple child scripts. The problem is, after the first child script is executed, it fails to move to the next script. I assume it's due to my script exit?
For instance, in batch to return to the parent... (12 Replies)
_lwp_cond_signal(2) System Calls _lwp_cond_signal(2)NAME
_lwp_cond_signal, _lwp_cond_broadcast - signal a condition variable
SYNOPSIS
#include <sys/lwp.h>
int _lwp_cond_signal(lwp_cond_t *cvp);
int _lwp_cond_broadcast(lwp_cond_t *cvp);
DESCRIPTION
The _lwp_cond_signal() function unblocks one LWP that is blocked on the LWP condition variable pointed to by cvp.
The _lwp_cond_broadcast() function unblocks all LWPs that are blocked on the LWP condition variable pointed to by cvp.
If no LWPs are blocked on the LWP condition variable, then _lwp_cond_signal() and _lwp_cond_broadcast() have no effect.
Both functions should be called under the protection of the same LWP mutex lock that is used with the LWP condition variable being sig-
naled. Otherwise, the condition variable may be signalled between the test of the associated condition and blocking in _lwp_cond_wait().
This can cause an infinite wait.
RETURN VALUES
Upon successful completion, 0 is returned. A non-zero value indicates an error.
ERRORS
The _lwp_cond_signal() and _lwp_cond_broadcast() functions will fail if:
EINVAL The cvp argument points to an invalid LWP condition variable.
EFAULT The cvp argument points to an invalid address.
SEE ALSO _lwp_cond_wait(2), _lwp_mutex_lock(2)SunOS 5.11 8 Dec 1995 _lwp_cond_signal(2)