The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
writing to a file amitrajvarma Shell Programming and Scripting 1 03-09-2008 09:29 PM
Writing to a File using pl/sql stky13 High Level Programming 1 02-22-2008 04:45 AM
Reading a file and writing the file name to a param file. thebeginer UNIX for Advanced & Expert Users 1 10-05-2007 01:38 PM
Writing to another file dreams5617 Shell Programming and Scripting 3 07-05-2006 10:39 AM
concurrent file access beechwood Filesystems, Disks and Memory 1 05-25-2002 01:19 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-01-2005
Registered User
 

Join Date: Jul 2005
Posts: 45
Concurrent writing to file

Hi
I have a ksh that can have multiple instances running at the same time.

The script (each instance) uses the SAME log file to write to.

Should this cause a problem or is the ksh clever enough to queue write requests to the file?

Thanks.

GMMIKE
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-01-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,352
ksh will not do anything special to help you. Use append mode. That is do NOT use >. Use >> instead...
echo something >> logfile

The kernel ensures that multiple processes writing to files in append mode do not step on each other's data.
Reply With Quote
  #3 (permalink)  
Old 11-01-2005
Registered User
 

Join Date: Jul 2005
Posts: 45
Great, thanks.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0