[clug-talk] file locking in bash?
Roy Souther
roy at silicontao.com
Fri Jul 27 07:57:18 PDT 2007
Is there anyway to do file locking in a bash script? I need to remove
the race hazard from a script that has multiple running instances per
user, each trying to make changes to a text file. I need to get
exclusive access to a file and make the other instances wait their turn.
Any ideas? Flock is supported by more advances script engines like Perl
but flock seems to be beyond the ability of a simple shell like bash.
Royce Souther
www.SiliconTao.com
Let Open Source help your business move beyond.
For security this message is digitally authenticated by GnuPG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://clug.ca/pipermail/clug-talk_clug.ca/attachments/20070727/75006f18/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://clug.ca/pipermail/clug-talk_clug.ca/attachments/20070727/75006f18/attachment.bin
More information about the clug-talk
mailing list