I am getting the following error when i run your code
[CODE]
awk: syntax error near line 1
awk: illegal statement near line 1
awk: syntax error near line 1
awk: bailing out near line 1
BTW in your code where is the input file parameter and output file parameter.
Hi Guys,
the requirement is like this,
i am having a error log file in this format,
4594.493: parallel nursery GC 2594592K->2544691K (2969600K), 30.848 ms
4605.958: parallel nursery GC 2634887K->2584986K (2969600K), 38.900 ms
4619.079: parallel nursery GC 2822555K->2774812K... (12 Replies)
Hi all;
I'm having headache on append one line to another based on the fix position.Hope u guys can help.
All i need to do is append the line that start with '3' to a line which start with '1' and the position for line 3 that i need to append is 22.
The original file look like this:
... (2 Replies)
firstly, i check is the variable empty or not, if so
vesselNameList=`echo $vesselName`
if not
vesselNameList="${vesselNameList}""\n"`echo "$vesselName"`
and it produces this result
BUNGA TERATAI 3 5055\
JADE TRADER 143W\
MOL SPLENDOR 0307A
BUNGA TERATAI 3 5055\
JADE... (1 Reply)
Hello, I am (trying) to write a script that will check to see how many users are logged on to my machine, and if that number is more than 60 I need to kill off all the oldest sessions that are over 60. So far I have been able to check how many users are on and now I am at the part where I have to... (3 Replies)
I have a .DAT file like below.
26666666660001343 000001004OLF 029100020090820
27777777770000060 000001004ODL-CH001000020090820
28888888880000780 000001013OLF 006500020090820
.......
........
and so on.....
I want to append each line in a file in .KSH script with XXX with position... (5 Replies)
I have a file FILE1.DAT like below
21111111110001343 000001004OLF-AA029100020091112
21111111110000060 000001004ODL-CH001000020091112
24444444440001416 000001045OLF-AA011800020091112
23333333330001695 000001039OLF-AA030600020091112
23333333330000111 000001039ODL-SP002000020091112... (2 Replies)
Hi all,
I want to check whether tar file exists in the directory or not. If tar file exists in the directory then I want to append the files to it.
I am using the below command to tar files if the file does not exist.
tar zcvf <tar file name> <Files to append>
However, if want to... (4 Replies)
I have a file which has lines that end with a plus (+) sign. I would like to get the next line appended to the one with the plus. For example
bla bla bla bla bla +
blip blip blip
would become
bla bla bla bla bla blip blip blip
However not all lines end with a plus sign . I would... (2 Replies)
Hello All,
I have the following code in PERL to write data to excel sheet.
Can someone please help me about how to append data to an exisitng cell?
For ex in the below given case,Cell 1,1 has Active State PERL
Now I want to add a new line like "prorgamming" without overwritting the... (3 Replies)
Good evening
I have the below requirements, as I am not an experts in Linux/Unix and am looking for your ideas how I can do this.
I have file called file1 and file2.
I need to get the second column which is text1_random_alphabets and find that in file 2, if it's exists then print the 3rd... (4 Replies)
Discussion started by: mychbears
4 Replies
LEARN ABOUT DEBIAN
ost_sharedfile
ost::SharedFile(3) Library Functions Manual ost::SharedFile(3)NAME
ost::SharedFile -
This class defines a database I/O file service that can be shared by multiple processes.
SYNOPSIS
#include <file.h>
Inherits ost::RandomFile.
Public Member Functions
SharedFile (const char *path)
Open or create a new database file.
SharedFile (const SharedFile &file)
Create a shared file as a duplicate of an existing shared file.
virtual ~SharedFile ()
Close and finish a database file.
Error restart (void)
Restart an existing database; close and re-open.
Error fetch (caddr_t address=NULL, ccxx_size_t length=0, off_t position=-1)
Lock and Fetch a portion of the file into physical memory.
Error update (caddr_t address=NULL, ccxx_size_t length=0, off_t position=-1)
Update a portion of a file from physical memory.
Error clear (ccxx_size_t length=0, off_t pos=-1)
Clear a lock held from a previous fetch operation without updating.
Error append (caddr_t address=NULL, ccxx_size_t length=0)
Add new data to the end of the file.
off_t getPosition (void)
Fetch the current file position marker for this thread.
bool operator++ (void)
bool operator-- (void)
Additional Inherited Members
Detailed Description
This class defines a database I/O file service that can be shared by multiple processes.
Each thread should access a dup of the database object, and mutex locks can be used to preserve transaction integrety if multiple threads
are used.
SharedFile is used when a database may be shared between multiple processes. SharedFile automatically applies low level byte-range 'file
locks', and provides an interface to fetch and release byte-range locked portions of a file.
Author:
David Sugar dyfet@ostel.com This class defines a database I/O file service that can be shared by multiple processes.
Constructor & Destructor Documentation
ost::SharedFile::SharedFile (const char *path)
Open or create a new database file. You should also use Initial.
Parameters:
path pathname of database to open.
ost::SharedFile::SharedFile (const SharedFile &file)
Create a shared file as a duplicate of an existing shared file. Parameters:
file original file.
virtual ost::SharedFile::~SharedFile () [virtual]
Close and finish a database file.
Member Function Documentation
Error ost::SharedFile::append (caddr_taddress = NULL, ccxx_size_tlength = 0)
Add new data to the end of the file. Locks file during append.
@param address address to use, or NULL if same as last I/O.
@param length length to use, or 0 if same as last I/O.
Error ost::SharedFile::clear (ccxx_size_tlength = 0, off_tpos = -1)
Clear a lock held from a previous fetch operation without updating. Returns:
errSuccess on success.
Parameters:
length length to use, or 0 if same as last I/O.
pos file position to use or -1 if same as last I/O.
Error ost::SharedFile::fetch (caddr_taddress = NULL, ccxx_size_tlength = 0, off_tposition = -1)
Lock and Fetch a portion of the file into physical memory. This can use state information to fetch the current record multiple times.
Returns:
errSuccess on success.
Parameters:
address address to use, or NULL if same as last I/O.
length length to use, or 0 if same as last I/O.
position file position to use -1 if same as last I/O.
off_t ost::SharedFile::getPosition (void)
Fetch the current file position marker for this thread. Returns:
file position offset.
bool ost::SharedFile::operator++ (void)
bool ost::SharedFile::operator-- (void)
Error ost::SharedFile::restart (void) [inline], [virtual]
Restart an existing database; close and re-open. Returns:
errSuccess if successful.
Reimplemented from ost::RandomFile.
Error ost::SharedFile::update (caddr_taddress = NULL, ccxx_size_tlength = 0, off_tposition = -1)
Update a portion of a file from physical memory. This can use state information to commit the last read record. The current lock is also
cleared.
Returns:
errSuccess on success.
Parameters:
address address to use, or NULL if same as last I/O.
length length to use, or 0 if same as last I/O.
position file position to use or -1 if same as last I/O.
Author
Generated automatically by Doxygen for GNU CommonC++ from the source code.
GNU CommonC++ Sat Jun 23 2012 ost::SharedFile(3)