I have requirement to run different task based on input value. the sample file as below:
file1 (contains code need to be run)
file2 (contains all codes and job name)
the code I wrote as below:
My problem is for same prefix (example aaa), I only need to run job2 once.
for example
file1 has code as below:
aaa1
aaa2
I can only run job_a2 once, but my current script runs twice.
I changed file2 as below
but if the file1 like below, it failed again.
anybody can give me some idea to resolve this issue?
If it is running, then there is a pid on stdout, and a new run will be a duplicate. By tying stdout to stderr, you can get the letters that say it is being run (not just viewed or whatever) (fuser puts pids and separating white space on stdout and all else on stderr).
You can write the job's pid in a control file named for the job, and search for a running copy that way, but fuser is cleaner and simpler. Binding a socket can be exclusive, too.
If it is running, then there is a pid on stdout, and a new run will be a duplicate. By tying stdout to stderr, you can get the letters that say it is being run (not just viewed or whatever) (fuser puts pids and separating white space on stdout and all else on stderr).
You can write the job's pid in a control file named for the job, and search for a running copy that way, but fuser is cleaner and simpler. Binding a socket can be exclusive, too.
Hello all..
i have few task to do on specific day ar per weekday or weekend...
for example i have 3 tasks:
task1
task2
task3
Now i need to create a shell script
If it is weekday it will change the status of these tasks as below
sendevent -E CHANGE_STATUS -s SUCCESS -J task1... (4 Replies)
Hi folks!
I need you help to discover what's the impact of a duplicated UID in an operating system. What's the meaning when someone put in different users the same UID? (3 Replies)
Sometimes we need a single instance of a script to run at a time. Meaning, the script itself should detects whether any instances of himself are still running and act accordingly.
When multiple instances of one script running, it’s easy to cause problems. I’ve ever seen that about 350 instances... (4 Replies)
I have an task definition listing xml file that contains a list of tasks such as
<TASKLIST
<TASK definition="Completion date" id="Taskname1" Some other
<CODE name="Code12"
<Parameter pname="Dog" input="5.6" units="feet" etc /Parameter>
<Parameter... (3 Replies)
I have a file contains
TASK gsnmpproxy {
CommandLine = $SMCHOME/bin/gsnmpProxy.exe
}
TASK gsnmpdbgui {
CommandLine = $SMCHOME/bin/gsnmpdbgui.exe
I would like to comment and than uncomment specific task eg TASK gsnmpproxy
Pls suggest how to do in shell script (9 Replies)
Hi,
I have the root id and the uid is always 0 for the root. Can i create another user say admin with the uid as 0? If so will it have the same privilege as that of user.
Will there be any effect while doing this?
lorcan (6 Replies)
I am able to run the UNIX commands in a Windows box from a UNIX box through "SSH" functionality. But whenever the SSH connection is established between UNIX and Windows, password for windows box is being asked.
Is there a way to avoid asking password whenever the SSH connection is made? Can I... (1 Reply)
Hi there,
I would like to write a script which while running will kill and then execute again a task every 15 minutes.
Here's what I want to do:
Al Jazeera English have a low quality, time-limited 15 minute trial stream up at their site. I.e. when I click on the 56K link, it will play in... (0 Replies)