Hi,
I have several files with data that have to be imported to a database. These files contain records with separator characters. Some records are corrupt (2 separators are missing) and I need to correct them prior to importing them into the db.
Example:
... (5 Replies)
Hello All,
How to replace a string in nth line of a file using sed or awk.
For Ex: test.txt
Line 1 : TEST1 TEST2 TEST3
Line 2 : TEST1 TEST2 TEST3 TEST4
Line 3 : TEST1 TEST2 TEST3 TEST5
Line 4 : TEST1 TEST2 TEST3 TEST6
Line 5 : TEST1 TEST2 TEST3 TEST7
i want to go to 4th line of a... (1 Reply)
Hi
My input file is like this for eg:
abc abc abc abc abc abc
i would like to replace "abc" with "cba" where the occurrence is divisible by 2
of eg here 2nd, 4th and 6th occurence shud be replace
can anyone suggest in awk or sed (11 Replies)
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
Greetings experts. Searched the forums (perhaps not hard enough?) - Am searching for a method to capture all output from a log file following the nth occurrence of a known string.
Background:
Using bash, I want to monitor my Oracle DB alert log file. The script will count the total # of... (2 Replies)
Hi,
I am getting crazy after days on looking at it:
Bash in Ubuntu 12.04.1
I want to do this:
pattern="system /path1/file1 file1"
new_pattern=" data /path2/file2 file2"
file to edit: data.db
- I need to search in the file data.db for the nth occurrence of pattern
- pattern must... (14 Replies)
Please can someone help with this?
I have a file with lines as follows:
word1 word2 word3 word4 word5 word6 word7 word8
word1 word2 word3 word4 word5 word6 word7 word8
word1 word2 word3 word4 word5 word6 word7 word8
word1 word2 word3 word4 word5 word6 word7 word8
When I use the... (7 Replies)
Hi,
I would like to know how, using sed, be able to insert contents of file2 in file1 after say the second occurrence of a given string? e.g.
> cat file1
banana
apple
orange
apple
banana
pear
tangerine
apple
> cat file2
I don't like apples
What would be the sed command to insert... (5 Replies)
Hi All,
I am very new to shell scripting and tried to search this in the forum but no luck.
Requirment:
I have an input file which is comma separated. I need to replace the value in 4th column with another value. This has to happen for all the lines in the file.
Sample data:
Input... (2 Replies)
Hello,
Below command trims right after the nth occurrence of a string.
When I try in while loop, it is not working.
In Terminal
IFS=/ ; read -ra val < Textfile ; echo "${val:0:3}"
It gives only one line:
sunday/monday/tuesday
Textfile:
sunday/monday/tuesday/wednesday/thursday... (2 Replies)
Discussion started by: baris35
2 Replies
LEARN ABOUT DEBIAN
sotransender
SoTranSender(3IV)() SoTranSender(3IV)()
NAME
SoTranSender -- sends database changes for transcription
INHERITS FROM
SoTranSender
SYNOPSIS
#include <Inventor/misc/SoTranscribe.h>
Methods from class SoTranSender:
SoTranSender(SoOutput *output)
~SoTranSender()
SoOutput * getOutput() const
void insert(SoNode *node)
void insert(SoNode *node, SoNode *parent, int n)
void remove(SoNode *parent, int n)
void replace(SoNode *parent, int n, SoNode *newNode)
void modify(SoNode *node)
void prepareToSend()
DESCRIPTION
This class is used for transcribing Inventor data. Transcription is the process of packaging changes to a database and sending them over a
"wire" to another database.
The SoTranSender class is used on the sending side of transcription. It packages up changes to a Inventor database into a file or memory
area defined by an SoOutput instance. It supports a limited set of changes to a database; each change is stored as a command in the tran-
scription area. The SoTranReceiver class can be used at the other end to interpret the transcribed commands.
METHODS
SoTranSender(SoOutput *output)
The constructor takes a pointer to an SoOutput instance that determines what the transcription area is (file or memory).
~SoTranSender()
Destructor.
SoOutput * getOutput() const
Returns pointer to current SoOutput instance.
void insert(SoNode *node)
Adds an INSERT command to the transcription area. The given node will be added as the last child of the root node on the receiving end.
void insert(SoNode *node, SoNode *parent, int n)
Adds an INSERT command to the transcription area. The given node will be added as the nth child of the given parent node on the receiv-
ing end. A NULL parent node causes the node to be added to the receiving end's root node.
void remove(SoNode *parent, int n)
Adds a REMOVE command to the transcription area. The nth child of the given (non-NULL) parent node on the receiving end will be removed.
void replace(SoNode *parent, int n, SoNode *newNode)
Adds a REPLACE command to the transcription area. The nth child of the given (non-NULL) parent node on the receiving end will be
replaced with newNode.
void modify(SoNode *node)
Adds a MODIFY command to the transcription area. Updates the field data for the given node to the new contents. Note that this changes
only field data; children of groups are not affected, nor is any non-field instance data.
void prepareToSend()
Prepares a SoTranSender instance for transcription, making sure the transcription area is complete and all packaged to go. This must be
called before the transcription can be performed.
SEE ALSO
SoOutput, SoTranReceiver
SoTranSender(3IV)()