![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| running exe | phani_sree | High Level Programming | 2 | 11-23-2006 06:54 AM |
| Running .sh from PHP??? | royh | Shell Programming and Scripting | 1 | 07-03-2005 04:32 AM |
| Running cgi | CSGUY | UNIX for Dummies Questions & Answers | 3 | 04-30-2005 08:42 PM |
| running .sh, .sql .etc how to? | etravels | UNIX for Dummies Questions & Answers | 2 | 02-12-2004 09:31 AM |
| running NIS over ssh | Andy Hibbins | Security | 2 | 10-12-2001 08:22 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||||
|
Code:
# cat one.sh
#!/bin/ksh
if [ -f /tmp/lockfile ]; then
exit
fi
touch /tmp/lockfile
echo "Process one doing work..."
sleep 10
echo "Process one completed work..."
rm /tmp/lockfile
# cat two.sh
#!/bin/ksh
if [ -f /tmp/lockfile ]; then
exit
fi
touch /tmp/lockfile
echo "Process two doing work..."
sleep 10
echo "Process two completed work..."
rm /tmp/lockfile
# ./one.sh &
[1] 7377
# Process one doing work...
# ./two.sh
# ./two.sh
Process one completed work...
# ./two.sh
Process two doing work...
Process two completed work...
#
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|