I have a file named "Test_2008_01_21"
The file contains a string "manual" that occurs many times in the file
How can i find the positions of the string "manual" in the file
Ex: if the string " manual " occurs three times in the file. i want to replace the second occurance of string the " manual " with another string "annual".
How it can be done?
Assuming there is only one instance of "manual" one a line:
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)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found..The issue is the last... (15 Replies)
Hi All,
My requisite is to search for the string "0108"(which is the year and has come in the wrong year format) in a particular column say 4th column in a tab delimited file and then replace it with 2008(the correct year format) in the same position where 0108 was found in the same file..The... (27 Replies)
Hello everyone this is my first post of many to come :)
I am writing a script and in this script at one point i need to replace a character in a particular position in a string for example:
in the string "mystery" i would need to replace the 3rd position to an "r" so the string becomes... (3 Replies)
Hi
I am looking for a particular string in a file.If the string exists, then I want to replace another string with some other text.Once replaced, search for the same text after that character position in the file. :wall:
E.g: Actual File content:
Hello
Name: Nitin Raj
Welcome to Unix... (4 Replies)
I asked this before, but my problem got more complicated. Heres what I am trying to do:
I'm trying to replace a string at a certain location with another string.
Heres the file I'm trying to change:
\E
I want to replace the escape code at the 3rd line, 2nd column with this escape code... (3 Replies)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Hi,
Here's my dilemma.
I need to replace the string Sept_2012 to Oct_2012 in all *config.py files within the current directory and below directories
Is this possible?
Also I am trying to find all instances of the string Sept_2012 within files in the current directory and below
I have... (13 Replies)
Hi,
I have a file with multiple lines(fixed width dat file). I want to search for '02' in the positions 45-46 and if available, in that lines, I need to replace value in position 359 with blank. As I am new to unix, I am not able to figure out how to do this. Can you please help me to achieve... (9 Replies)
Hello guys, would you please help me with this?
this is the line inside a file:
first line Something Today YYDDPPSVXIPYYY0XXXOFFS00000000000?
I'd like to find the position of string XXX from string PYYY
In the example above
XXX starts from 6th position from PYYY
desired... (4 Replies)
Discussion started by: netrom
4 Replies
LEARN ABOUT ULTRIX
dwtstextreplace
DwtSTextReplace(3Dwt)DwtSTextReplace(3Dwt)Name
DwtSTextReplace - Replaces a portion of the current text string in the simple text widget or inserts a new substring in the text.
Syntax
void DwtSTextReplace(widget, from_pos, to_pos, value)
Widget widget;
int from_pos, to_pos;
DwtCompString value;
Arguments
widget Specifies the ID of the simple text widget whose text string you want to replace.
from_pos Specifies the beginning character position within the text string marking the text being replaced.
to_pos Specifies the last character position within the text string marking the text being replaced.
value Specifies the text to replace part of the current text in the simple text widget.
Description
The DwtSTextReplace function replaces part of the text string in the simple text widget. Within the window, the positions are numbered
starting from 0 and increasing sequentially. For example, to replace the second and third characters in the string, from_pos should be 1
and to_pos should be 3. To insert a string after the fourth character, from_pos and to_pos should both be 4.
See AlsoDwtSText(3Dwt), DwtSTextGetString(3Dwt), DwtSTextGetEditable(3Dwt), DwtSTextSetEditable(3Dwt), DwtSTextGetMaxLength(3Dwt), DwtS-
TextSetMaxLength(3Dwt), DwtSTextSetSelection(3Dwt), DwtSTextClearSelection(3Dwt), DwtSTextGetSelection(3Dwt)
Guide to the XUI Toolkit: C Language Binding
Guide to the XUI Toolkit Intrinsics: C Language Binding
DwtSTextReplace(3Dwt)