The OP is after a portable solution, so lets test for executable /usr/bin/flock
and use that when available but revert to the mkdir method on systems without it:
These 2 Users Gave Thanks to Chubler_XL For This Post:
Hi,
I am writing a shell script to invoke a C++ program. Before I start the C++ program (oi7loadbalancer), I am checking if the process is already running. I start the process only if it is not already running. I have the following check in my script.
proccount=`ps -f -u $USER_NAME | grep... (8 Replies)
Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Hi,
PHP user here. I'm using an endless loop to perform to mimic a cron. The script does something every 20 minutes. It sleep()s in the meantime.
I have various checks that ensure that only instance can run, including a "gentleman agreement" locked file.
However, I'd like to make sure... (2 Replies)
Hello.
I have a status command in AIX box, which provides output as below:
$ status
You are running the application on pegasus2
----Program Name------|--Avail / Total---------|
MQ | 1/2 |
ORACLE | 10/10 |
TMADMIN ... (3 Replies)
Hi All,
After reading that the sort command in Linux can be made to use many processor cores just by using a simple script which I found on the internet, I was wondering if I can use similar techniques for programs like the awk and sed?
#!/bin/bash
# Usage: psort filename <chunksize>... (7 Replies)
I have run 10 instances of the process eg, process name is BG
nohup /WP01IRB1_irbapp/IRBWPROD/RB/bin/BG -c 1 -t 23 -a '-caTop TESTBILLCYCLE='5FEB13_81PT19NPT''>a.txt &
nohup /WP01IRB1_irbapp/IRBWPROD/RB/bin/BG -c 2 -t 23 -a '-caTop TESTBILLCYCLE='5FEB13_81PT19NPT''>b.txt &
nohup... (3 Replies)
Hi,
I want to write one program in C in Unix OS which will check the running status of a process time to time. If the process is stopped somehow by any means, it will ensure that the process is restarted and only one copy of the process image should run in memory at any point of time for the user.... (2 Replies)
Hello All,
Greetings !!
I have a query here to all is as follows:
Question: Let's say we are running a script in a UNIX box and we have opened an another session and then made changes in script of some statements NOT to be print some values(just an example) so when I am monitoring the... (5 Replies)
Hi Guys,
I have a main_script.sh which runs every day and scheduled in crontab.
in the main script i read data from config file
test.config
apple
mango
orange
main_script.sh
for i in `cat test.config`
do
if
then
echo 'Apple' (3 Replies)
Discussion started by: Master_Mind
3 Replies
LEARN ABOUT OSF1
uudemon
uudemon(4) Kernel Interfaces Manual uudemon(4)NAME
uudemon.admin, uudemon.cleanu, uudemon.hour, uudemon.poll - Administrative shell scripts for polling remote systems, cleaning up spool
directories, reporting status to the system administrator, and routine invocations of the uuxqt and uusched daemons
SYNOPSIS
These shell scripts reside in the following directory:
/usr/lib/uucp
DESCRIPTION
All the scripts can be run from the command line or can be run automatically by the cron daemon. To automatically run the scripts, remove
the comment character (#) from the beginning of the relevant line in the /var/spool/cron/crontabs/uucp file.
This script reports status to the system administrator. It issues the uustat command to find out the status of uucp jobs. It mails the
results to the uucp login ID. The script may be modified to send mail to any login ID such as the uucp administrative login ID (uucpa) or
root. This script cleans up the /var/spool/uucp and /var/spool/uucppublic directories by running the uucleanup command. The uucleanup com-
mand is run with the following parameters: -C7, -D7, X2, -o2, -W1. This script runs the uusched and uuxqt daemons in the background. This
script polls the systems listed in the /usr/lib/uucp/Poll file. The uudemon.poll script should be scheduled before the uudemon.hour
script. This allows uudemon.poll to create any command files before cron runs the uudemon.hour script.
FILES
Contains the uudemon.admin, uudemon.cleanu, uudemon.hour and uudemon.poll files. Contains the uucp file.
RELATED INFORMATION
Commands: cron(8), uucleanup(8), uusched(8), uuxqt(1)
Files: /usr/lib/uucp delim off
uudemon(4)