Sponsored Content
Operating Systems HP-UX find the position in a file and insert the data there Post 302071055 by Ygor on Tuesday 11th of April 2006 09:31:33 PM
Old 04-11-2006
Your script is limited to 26 files and mine is limited to 676 files. So your script is more limited.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to insert at a particular position in flat file

Hi All, I have a flat file with ~ as de-limiter (e.g: aaa~ba a~caa~0~d~e) What I want is check if the 4th character is 0 and replace it with say 4. So now it becomes : aaa~ba a~caa~4~d~e. I have to do this for the whole file, but the delimiter position remains the same, not the... (10 Replies)
Discussion started by: akdwivedi
10 Replies

2. Shell Programming and Scripting

how to find a position and print some string in the next and same position

I need a script for... how to find a position of column data and print some string in the next line and same position position should find based on *HEADER8* in text for ex: ord123 abs 123 987HEADER89 test234 ord124 abc 124 987HEADER88 test235 ... (1 Reply)
Discussion started by: naveenkcl
1 Replies

3. UNIX for Dummies Questions & Answers

find if a position is between a given start and end position

Hi, I am a newbie in unix programming so maybe this is a simple question. I would like to know how can I make a script that outputs only the values that are not between any given start and end positions Example file1: 2 30 40 80 82 100 file2: ID1 1 ID2 35 ID3 80 ID4 81 ID6... (9 Replies)
Discussion started by: fadista
9 Replies

4. Shell Programming and Scripting

Insert character in a specific position of a file

Hi, I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this? I tried to add it at 5th position using the below code. It didnt work. Please help!!! awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
Discussion started by: gpaulose
1 Replies

5. Shell Programming and Scripting

Insert file contents into another file at a given position

I'm trying to write a small shell script/command to insert the contents of one file into another file at a position marked with a given text string. It's not necessarily at the top or bottom of the file so I can't just use cat to cat the files together. I think probably sed with the r option is... (5 Replies)
Discussion started by: shaun29
5 Replies

6. Shell Programming and Scripting

How to find character position in file?

how to find character positionin file? i.e string = "123X568" i want to find the position of character "X". Thanks (6 Replies)
Discussion started by: LiorAmitai
6 Replies

7. Shell Programming and Scripting

Find the starting position in a file

I have a file called "INPUT" which takes the following format MNT-BANK-NUMBERO:006,00:N MNT-100-ACCOUNT-NUMBERO:018,00:N MNT-1000-DESCRIPTIONO:045:C . . . Now i got to find the displacements of the account numbers of each field of a file. For the field MNT-BANK-NUMBERO:006,00:N, the... (4 Replies)
Discussion started by: bobby1015
4 Replies

8. UNIX for Dummies Questions & Answers

Need to copy data from one position to another in file

Hi. I need to write a script that will allow me to copy data from one position in a line to another position while changing the first 2 bytes of the data to a constant. Here is an example of a line of data before and what it needs to look like after. there are about 200 lines in the file. ... (1 Reply)
Discussion started by: wlb_shore_user
1 Replies

9. Shell Programming and Scripting

Add '|' to data file on particular position

I have below scenario where i am getting a flat file but with some bad data incoming data format id|name|ind|crncy 123|xxx|y|usd 234|yy|n| 456|a|y90.5|vvv|gbp ----bad dataneed to cleanse the bad data above by adding a pipe '|' after 3rd column 'ind' if pipe '|' is not already there ... (1 Reply)
Discussion started by: rakesh5300
1 Replies

10. Shell Programming and Scripting

Column to row and position data in a text file

Hi everyone.. I have a list of values in a file... a, b, c, 1, 2, 3, aaaa, bbbbb, I am interested in converting this column to a row.. "text",aaaa, bbbb a,1 (7 Replies)
Discussion started by: manihi
7 Replies
ost::LinkedDouble(3)					     Library Functions Manual					      ost::LinkedDouble(3)

NAME
ost::LinkedDouble - Self managed double linked list object chain. SYNOPSIS
#include <object.h> Public Types enum InsertMode { modeAtFirst, modeAtLast, modeBefore, modeAfter } Requested in overloaded insert() method to indicate how to insert data into list. Public Member Functions virtual LinkedDouble * getFirst (void) Get first linked object in list. virtual LinkedDouble * getLast (void) Gets the last object in the list. virtual LinkedDouble * getInsert (void) Virtual to get the insert point to use when adding new members. LinkedDouble * getNext (void) Get next object, for convenience. LinkedDouble * getPrev (void) Get prev object in the list. virtual void insert (LinkedDouble &obj, InsertMode position=modeAtLast) Insert object into chain at given position, as indicated by InsertMode; If no position is given, it defaults to modeAtLast, inserting element at list's end. virtual void detach (void) Remove object from chain. LinkedDouble & operator+= (LinkedDouble &obj) LinkedDouble & operator-- () Protected Member Functions LinkedDouble () virtual ~LinkedDouble () virtual void enterLock (void) virtual void leaveLock (void) virtual LinkedDouble * firstObject () virtual LinkedDouble * lastObject () Protected Attributes LinkedDouble * nextObject LinkedDouble * prevObject Detailed Description Self managed double linked list object chain. This is used for accumulating lists by using as a base class for a derived subclass. Author: David Sugar dyfet@gnutelephony.org Accumulating double linked list. Member Enumeration Documentation enum ost::LinkedDouble::InsertMode Requested in overloaded insert() method to indicate how to insert data into list. Enumerator: modeAtFirst insert at first position in list pointed by current object modeAtLast insert at last position in list pointed by current object modeBefore insert in list before current object modeAfter insert in list after current object Constructor &; Destructor Documentation ost::LinkedDouble::LinkedDouble () [inline], [protected] virtual ost::LinkedDouble::~LinkedDouble () [protected], [virtual] Member Function Documentation virtual void ost::LinkedDouble::detach (void) [virtual] Remove object from chain. virtual void ost::LinkedDouble::enterLock (void) [protected], [virtual] virtual LinkedDouble* ost::LinkedDouble::firstObject () [protected], [virtual] virtual LinkedDouble* ost::LinkedDouble::getFirst (void) [virtual] Get first linked object in list. This may be dynamically recast, and may refer to a master static bookmark pointer in a derived class. Otherwise it follows list to front. Returns: pointer to first object in list. virtual LinkedDouble* ost::LinkedDouble::getInsert (void) [virtual] Virtual to get the insert point to use when adding new members. This may be current, or always head or always tail. As a virtual, this allows derived class to establish 'policy'. Returns: pointer to insertion point in list. virtual LinkedDouble* ost::LinkedDouble::getLast (void) [virtual] Gets the last object in the list. This normally follows the links to the end. This is a virtual because derived class may include a static member bookmark for the current end. Returns: pointer to last object in list. LinkedDouble* ost::LinkedDouble::getNext (void) [inline] Get next object, for convenience. Derived class may use this with a dynamic cast. Returns: next object in list. LinkedDouble* ost::LinkedDouble::getPrev (void) [inline] Get prev object in the list. Returns: pointer to previous object. virtual void ost::LinkedDouble::insert (LinkedDouble &obj, InsertModeposition = modeAtLast) [virtual] Insert object into chain at given position, as indicated by InsertMode; If no position is given, it defaults to modeAtLast, inserting element at list's end. Parameters: object being inserted. position where object is inserted. virtual LinkedDouble* ost::LinkedDouble::lastObject () [protected], [virtual] virtual void ost::LinkedDouble::leaveLock (void) [protected], [virtual] LinkedDouble& ost::LinkedDouble::operator+= (LinkedDouble &obj) LinkedDouble& ost::LinkedDouble::operator-- () Member Data Documentation LinkedDouble* ost::LinkedDouble::nextObject [protected] LinkedDouble * ost::LinkedDouble::prevObject [protected] Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::LinkedDouble(3)
All times are GMT -4. The time now is 05:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy