Herbert
2006-01-22 03:40:16 UTC
I am a beginner in shell scripting.
I have a question regarding file handling in shell script.
There is a perl script as follows:
open (WRITEFILE, ">>/user/test.html");
flock WRITEFILE, LOCK_EX;
print (WRITEFILE "test");
....
print (WRITEFILE "<BR>");
close WRITEFILE
If I want to change this to ksh script, how can I do it?
open(WRITEFILE, '/user/test.html')
flock WRITEFILE, LOCK_EX
I am not sure of write something into file
close WRITEFILE.
Can anyone help me with this?
Thanks
I have a question regarding file handling in shell script.
There is a perl script as follows:
open (WRITEFILE, ">>/user/test.html");
flock WRITEFILE, LOCK_EX;
print (WRITEFILE "test");
....
print (WRITEFILE "<BR>");
close WRITEFILE
If I want to change this to ksh script, how can I do it?
open(WRITEFILE, '/user/test.html')
flock WRITEFILE, LOCK_EX
I am not sure of write something into file
close WRITEFILE.
Can anyone help me with this?
Thanks