The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need to execute 2 scripts, wait, execute 2 more wait, till end of file halo98 Shell Programming and Scripting 1 08-01-2006 05:42 PM
How to find the File Age and wait for that... redlotus72 UNIX for Dummies Questions & Answers 3 06-01-2005 04:13 AM
Lock File canman UNIX for Dummies Questions & Answers 4 05-06-2005 06:28 AM
How can a file be locked for a certain time? darthur UNIX for Dummies Questions & Answers 6 12-09-2003 11:35 AM
lock file! sskb UNIX for Dummies Questions & Answers 4 10-24-2001 06:10 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-13-2004
sunil_neha sunil_neha is offline
Registered User
  
 

Join Date: Apr 2004
Location: india
Posts: 7
Lock a file. AND Wait if file is locked

Hi,

I want to do the foll steps:

1. Check if someone has a lock on my file1.
2. if file1 is locked by any other user
wait in a loop till another user releases lock
3. when lock released, lock file1.
4. do procesing (write) on file1.
5. processing complete. release lock on file1.

Please also tell me how the can Wait mechanism can it be implemented best?

Please reply
  #2 (permalink)  
Old 07-13-2004
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,763
Are you doing this in a script or a language, - C, etc. ?
  #3 (permalink)  
Old 07-13-2004
sunil_neha sunil_neha is offline
Registered User
  
 

Join Date: Apr 2004
Location: india
Posts: 7
i want to do this in unix shell script...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0