Concurrent writing to file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Concurrent writing to file
# 1  
Old 11-01-2005
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
# 2  
Old 11-01-2005
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.
# 3  
Old 11-01-2005
Great, thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

NFS - concurrent write to same file normal ?

Hi all, Sorry if I sound like a novice , I have always thought that for network file system which can be shared, there will be some access restriction in which when user A is writing/editing fileA, user B is able to view the same fileA but cannot write/edit it until user A has... (6 Replies)
Discussion started by: javanoob
6 Replies

2. AIX

Difference between concurrent and enhanced concurrent VG

Hi, What are the differences between concurrent and enhanced concurrent VGs.? Any advantages of enhanced concurrent VG over normal concurrent vg Regards, Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies

3. Shell Programming and Scripting

awk - writing matching pattern to a new file and deleting it from the current file

Hello , I have comma delimited file with over 20 fileds that i need to do some validations on. I have to check if certain fields are null and then write the line containing the null field into a new file and then delete the line from the current file. Can someone tell me how i could go... (2 Replies)
Discussion started by: goddevil
2 Replies

4. UNIX for Dummies Questions & Answers

Writing a script that will take the first line from each file and store it in an output file

Hi, I have 1000 files names data1.txt through data1000.txt inside a folder. I want to write a script that will take each first line from the files and write them as output into a new file. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

5. Shell Programming and Scripting

Searching for Log / Bad file and Reading and writing to a flat file

Need to develop a unix shell script for the below requirement and I need your assistance: 1) search for file.log and file.bad file in a directory and read them 2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file 4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies

6. Shell Programming and Scripting

Concurrent execution

Hi all, I have a folder with sql files that need to be inserted in a DB with SQL*Plus. The thing is that it takes too long to insert them all one by one, so I want to insert them five at a time. Currently what I use is this: for $FILENAME in *.sql do sqlplus -s $DBUSER@$SID << EOF ... (0 Replies)
Discussion started by: Tr0cken
0 Replies

7. AIX

chvg -g on Concurrent VG

Hi, on normal (non concurrent) vgs, it's possible to extend a lun on san-storage , and use chvg -g to rewrite vgda, and use disks with the new size for lvm operations is the same procedure possbile on a hacmp-cluster (2 node in our case) with concurrent vgs in active/passive mode? cheers... (5 Replies)
Discussion started by: funksen
5 Replies

8. Shell Programming and Scripting

concurrent processes

We have a very large text file..contains almost 100K lines. We want to process this file to generate another text file as per our data requirement. As for now the parsing of data takes 20-25 mins each , for 100K lines. the current script uses : While Read Each Line do parsing.. Done ... (6 Replies)
Discussion started by: Amruta Pitkar
6 Replies

9. UNIX for Advanced & Expert Users

No concurrent login

Hi, I notice in my Sun Solaris 8 sparc workstatin, I am able to login concurrently using a same user ID. Is there a way to disallow this? That is, at anyone time, the user can have only 1 login session. How can it be done? Thanks (10 Replies)
Discussion started by: champion
10 Replies

10. Filesystems, Disks and Memory

concurrent file access

Hi I am fairly new to the Unix environment and need to understand how Unix handles concurrent access to files and how it differs to Win NT. Any help would be greatly appriciated :) (1 Reply)
Discussion started by: beechwood
1 Replies
Login or Register to Ask a Question