editing a character in a file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting editing a character in a file
# 8  
Old 04-24-2008
It means to click the "New Thread" button on the forum's overview page, as opposed to "Post Reply" to somebody else's thread with an unrelated question.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to remove newline character if it is the only character in the entire file.?

I have a file which comes every day and the file data look's as below. Vi abc.txt a|b|c|d\n a|g|h|j\n Some times we receive the file with only a new line character in the file like vi abc.txt \n (8 Replies)
Discussion started by: rak Kundra
8 Replies

2. Shell Programming and Scripting

Convert vi editing to text editing

Dear Guru's I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response. Srini (6 Replies)
Discussion started by: thummi9090
6 Replies

3. Shell Programming and Scripting

File character adjustment based on specific character

i have a reqirement to adjust the data in a file based on a perticular character the sample data is as below 483PDEAN CORRIGAN 52304037528955WAGES 50000 89BP ABCD MASTER352 5434604223735428 4200 58BP SOUTHERN WA848 ... (1 Reply)
Discussion started by: pema.yozer
1 Replies

4. Shell Programming and Scripting

editing line in text file adding number to value in file

I have a text file that has data like: Data "12345#22" Fred ID 12345 Age 45 Wilma Dino Data "123#22" Tarzan ID 123 Age 33 Jane I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes: Data "1012345#22" Fred ID... (16 Replies)
Discussion started by: say170
16 Replies

5. Shell Programming and Scripting

Help with file editing while keeping file format intact

Hi, I am having a file which is fix length and comma seperated. And I want to replace values for one column. I am reading file line by line in variable $LINE and then replacing the string. Problem is after changing value and writing new file temp5.txt, formating of original file is getting... (8 Replies)
Discussion started by: Mruda
8 Replies

6. Shell Programming and Scripting

read the text file and print the content character by character..

hello all i request you to give the solution for the following problem.. I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print g go goo goog googl google like this Using unix Shell scripting... without using... (1 Reply)
Discussion started by: samupnl
1 Replies

7. Shell Programming and Scripting

Breaking a file into three new files, character by character

I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies

8. Shell Programming and Scripting

Deleting all characters from 350th character to 450th character from the log file

Hi All, I have a big log file i want to delete all characters (between 350th to 450th characters) starting at 350th character position to 450th character position. please advice or sample code. (6 Replies)
Discussion started by: rajeshorpu
6 Replies

9. Shell Programming and Scripting

read in a file character by character - replace any unknown ASCII characters with spa

Can someone help me to write a script / command to read in a file, character by character, replace any unknown ASCII characters with space. then write out the file to a new filename/ Thanks! (1 Reply)
Discussion started by: raghav525
1 Replies

10. AIX

check for a particular character inside a file and substitute with a given character?

i am a newbie to shell script,so i want a kshell script in which i need to check for a particular character inside a file through conditional looping(like if ,case,while)and if that character exists ,then substitute a given character to that character. consider a file test.txt,inside the file... (1 Reply)
Discussion started by: karthikprasathk
1 Replies
Login or Register to Ask a Question
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)