Assuming that your requirement is to use the text file, you have no control over its format, and the lines are not guaranteed to be of equal length, then you cannot do this concurrently. You should be able to accomomplish what you want serially using file locking, but performance may not be acceptable if your file is large. Have each program gain an exclusive lock (see flock), slurp the file, search it and update the line, then rewrite the file and release the lock. Note that all programs that access the file must use flock on it for this to work.
In reply to Re: Multiple Acess to a single file
by hangon
in thread Multiple Acess to a single file
by sachu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |