Sponsored Content
Top Forums Shell Programming and Scripting How to remove a particular record from a file? Post 302217220 by danmero on Tuesday 22nd of July 2008 08:35:32 AM
Old 07-22-2008
Post a sample of your input file in the original format and the exact output you want and please place them within code tags (select the text and click on the # symbol above the edit window).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

remove duplicated xml record in a file under unix

Hi, If i have a file with xml format, i would like to remove duplicated records and save to a new file. Is it possible...to write script to do it? (8 Replies)
Discussion started by: happyv
8 Replies

2. UNIX for Dummies Questions & Answers

command to remove last record on file

Hi, First time on the forum. I have converted some files using the Unix to DOS command but need to strip off the last record that is generated from this conversion that contains just a ^Z. Is there any command that would accomplish this without having to do stream editing? (4 Replies)
Discussion started by: mheinen
4 Replies

3. UNIX for Dummies Questions & Answers

Remove First and Last Record from a file

Hi All, Could some one help me how to delete first & last record from a file Thanks in Advance....... Regards Cherrry (1 Reply)
Discussion started by: ravikuc
1 Replies

4. UNIX for Advanced & Expert Users

To remove the record from a file

Hi , In need to remove the record marked in red My input is as below : 1|ETG|63121387883|Alternate|Y 2||| 3|79.58|||GBP|| 4|001137001 4|0011372 5|1021701 5|1021901 1|ETG|63121387884|Alternate|Y 2||| 3|79.58|||GBP|| 4|001137001 5|1021702 5|1021802 1|ETG|63128363077|Alternate|Y 2|||... (1 Reply)
Discussion started by: laxmi131
1 Replies

5. Shell Programming and Scripting

remove newline chars in each record of file

Hi, I have a fixed width file with record length 10. I need to remove multiple newline characters present in each record. EX: af\n72/7\n s\n3\nad\n 2\n\n33r\n In the above file I want to remove new lines in red color(\n) but not (\n) Please provide me a solution. Thanks, Sri (1 Reply)
Discussion started by: srilaxmi
1 Replies

6. Shell Programming and Scripting

Remove particular record from a file

Hi:), I am having 110 records in a file and I want to delete particular record (say 63rd) . Which command can be use to achieve this ? (4 Replies)
Discussion started by: devmns
4 Replies

7. Shell Programming and Scripting

To remove a particular record from File

Dear Friends, Need your help to fix the issue we are facing. We have a requirement - Need to remove specific records from a comma separated file and create new file. It should check "filter.csv" file and then accordingly remove records from the input file and generate the output file.(not case... (5 Replies)
Discussion started by: SatishW
5 Replies

8. Shell Programming and Scripting

How to remove space from each record in file?

Hi , I want to remove space from each record in one file My file is like BUD, BDL ABC, DDD, ABC ABC, DDD, DDD, KKK The o/p should be BUD,BDL ABC,DDD,ABC ABC,DDD,DDD,KKK Can any one help me regarding this? (9 Replies)
Discussion started by: jagdishrout
9 Replies

9. Shell Programming and Scripting

Extract timestamp from first record in xml file and it checks if not it will replace first record

I have test.xml <emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp> <Join><id>101</id><city>london</city><date>06/06/14 2011</date></join> <Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join> <Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies

10. Shell Programming and Scripting

Getting error not able remove the record

export PATH=$PATH:/opt/IBM/db2/V9.5/95fp4/bin DB2INSTANCE=bancbcb1 export DB2INSTANCE db2 "connect to dyaxprpt user xyz using byx" echo "Load lastest data start" Row=$(db2 –x “delete from xyz.ROL_yxpwhere axl_ING_ID in(50127,50455,503458,175748)”) If ; then echo “no data deleted” elif ;... (2 Replies)
Discussion started by: jagu
2 Replies
StringEditor(3I)					    InterViews Reference Manual 					  StringEditor(3I)

NAME
StringEditor - single line interactive string editor SYNOPSIS
#include <InterViews/streditor.h> DESCRIPTION
StringEditor is an interactor that provides a convenient mouse-based interactive editor for text strings. It is suitable for incorporation into other components such as dialog boxes. Clicking inside the StringEditor (or calling the Edit function) initiates an edit. Subsequent keyboard events, which need not be inside the StringEditor, are interpreted as editing operations on the text. Clicking outside the StringEdit terminates the edit. StringEditor works with either fixed width or proportionally spaced fonts. EDITING MODEL
Text is selected with the mouse or with the keyboard. A single click of the left mouse button selects a new insertion point between char- acters. Dragging across the text selects a range of characters. A set of control characters is mapped into common editing operations. A character not specifically associated with commands is inserted in place of the the current selection, the replaced text is lost, and the selection becomes an insertion point following the inserted character. Commands currently defined include the following. CharacterLeft (^B) CharacterRight (^F) BeginningOfText (^A) EndOfText (^E) Move the selection one character position to the left or right, or to the beginning or end of the text. Erase (^H, DEL) Delete (^D) Delete the text of the current selection. If the selection is an insertion point, delete the previous character (Erase) or the next character (Delete) instead. SelectAll (^U) SelectWord (^W) Select the entire text, or extend the selection to the left by one whole word. These commands enable common editing operations to be performed without using the mouse. For example, to replace the previous word in the text, do a SelectWord and type the new text. SCROLLING
Strings that are too long to fit into the StringEditor can be scrolled horizontally. Middle-clicking inside the StringBrowser initiates ``grab-scrolling''. While the button is held down, the StringEditor scrolls the text to follow the mouse position, making it appear as though the user is dragging the test. Right-clicking engages ``rate-scrolling,'' a joy-stick-like scrolling interface in which the scrolling rate increases as the user drags the mouse away from the initial click point. For example, dragging the mouse rightwards after the initial click scrolls the browser rightwards at an increasing rate; dragging leftwards thereafter reduces the rate until scrolling stops entirely at the initial click point. Dragging left beyond this point makes the browser scroll in the reverse direction. PUBLIC OPERATIONS
StringEditor(ButtonState*, const char* sample, const char* done) Create a new StringEditor object. The ButtonState will be used to communicate the result of editing operations. An edit of the string will be terminated if any character in the string done is typed, and the ButtonState will be set to the terminating charac- ter. The shape of the new object is calculated from the length of the sample string. void Message(const char* text) Set the contents of the edit buffer to text. void Select(int point) void Select(int left, int right) Select an insertion point or a subrange of the edit buffer. void Edit() void Edit(const char* text, int left, int right) Initiate an edit. Specifying a string and selection range is short hand for first calling Message and Select with the corresponding parameters. const char* Text() Return the current value of the edit buffer. Note that this buffer is owned by the StringEditor, and that its contents are subject to change. It is the caller's responsibility to copy the string if the value will be needed in the long term. Handle(Event&) Handle the event, and read and process subsequent events until an Accept or Cancel command is executed or a down click occurs out- side the StringEditor's bounds. PROTECTED OPERATIONS
virtual boolean HandleChar(char) void InsertText(const char* text, int length) Subclasses of StringEditor can perform additional processing on the edit buffer. For instance, an editor for file names might do file name completion, or an editor for numeric input might check the validity of the string as it is entered. Derived classes should redefine the virtual function HandleChar as required. HandleChar should return true to indicate that the edit is completed, or false otherwise. InsertText can be used to insert text into the edit buffer, replacing any currently selected text. SEE ALSO
Interactor(3I), Button(3I) InterViews 23 May 1989 StringEditor(3I)
All times are GMT -4. The time now is 01:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy