9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guys,
I am trying to find a way within a bash script to check a file that exists in the same directory to ensure every line starts with 44 and is 12 digits long. If it doesn't then print some sort of text advising of the error and stop the script from going any further. If all lines... (1 Reply)
Discussion started by: mutley2202
1 Replies
2. Shell Programming and Scripting
Hi,
written a script which uses wait as follows
Main.sh
#!/usr/bin/ksh
nohup scrpit1 1 &
pid_1=$!
nohup scrpit1 2 &
pid_2=$!
wait $pid_1
wait $pid_2
nohup scrpit1 3 &
pid_1=$!
nohup scrpit1 4 & (1 Reply)
Discussion started by: krux_rap
1 Replies
3. Programming
hi all!
In my C++ program I have a parent process which forks 5 children processes.The processes do a job and then they have to do some sort of sleeping(not terminate) until the parent wakes them up again.There might be 1,2,5 or even 0 processes awake at any moment.The thing is that in the... (9 Replies)
Discussion started by: vlm
9 Replies
4. Shell Programming and Scripting
Hi,
I am facing a strange issue,
when i call a script from my while loop in background it doesnt go in background, despite the wait i put below the whil loop it goes forward even before the process put in background is completed.
cat abc.txt | while read -u4 line
do
#if line contains #... (2 Replies)
Discussion started by: mihirvora16
2 Replies
5. Shell Programming and Scripting
Hello
I need to source a script. But that script terminates with a trailing exit. Which exits my script. I'm using bash, and this doesn't work:
trap 'echo disabled' EXIT
source other_file
trap '' EXIT
Instead, it calls my trap, but then exits anyway. I could get disgusting and... (4 Replies)
Discussion started by: brsett
4 Replies
6. Shell Programming and Scripting
I'm attempting to write a pretty simple script. It opens a Filemaker file successfully. That Filemaker file takes around 30-90 seconds to finish. When it's done, it writes a few .xml files into the same directory where my shell script and the Filemaker script reside.
In my script, how can I... (2 Replies)
Discussion started by: alternapop
2 Replies
7. Shell Programming and Scripting
i have a bash script and I want to add to the begining of the script to make sure that the script is being ran as you are logged in as a certain user (userx) before continuing to run the script....how? (2 Replies)
Discussion started by: ajp7701
2 Replies
8. Shell Programming and Scripting
Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.
Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)
I need to start a background process, witch will be waiting... (2 Replies)
Discussion started by: alex_5161
2 Replies
9. Shell Programming and Scripting
the code:
do
} ] || mkdir -p ${mk_backup_dir}
&& echo "ERROR: release backup directory creation failed -${mk_backup_dir}" && exit
done
echo "INFO: Backup directories created"
the result:
mkdir: "/cm/uat_releases/riab/uat/2345": Permission denied
ERROR: release backup directory... (5 Replies)
Discussion started by: mjays
5 Replies