@ Neo : Windows os only and im using Unix Shell/Bash scripting.
I have applied the below logic to eliminate comma if available in the string and then kept each string in array. Then I tried to search it in the file,but replacing the contents in the file is not working as expected.
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)
Search and Replace a string pattern with empty in an xml file in unix:
My xml file would be like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999 </mobile><TRIG>srcujim-1</TRIG></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile><TRIG>ettertrtt-1</TRIG></Accounts>
... (1 Reply)
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 have a list of strings in file:
10 10 AAA
120 13 BBBBB
23 11 CCCCC
11 32 DDDDDD
I want to replace first column of the text such as: 10, 129, 23, 11 with 11, 22, 33, 44.
I can do line by line, but just not sure how to replace partial string without... (1 Reply)
I have file t1.log
Contents of t1.log file
Number of records processed:
Number of records rejected:
Error :
xyz ..........
abc ..........
aaa _]
start time :
end time :
Please let me know how i can remove the contents highlighted in red in the t1.log file.
Thanks
Sam (3 Replies)
Hi Guys,
I need replace part of string in a file.
for example:
ABC=123
CDE=122
DEF=456
ABC=123
DED=333
ABC=123
I need replace the value after ABC=, highlighted in red. I want to get following result;
ABC=456
CDE=122
DEF=456
ABC=456
DED=333
ABC=456
Anybody can help me this.
... (8 Replies)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT HPUX
dteditorinvokefindchangedialog
DtEditorInvokeFindChangeDialog(library call) DtEditorInvokeFindChangeDialog(library call)
NAME
DtEditorInvokeFindChangeDialog -- display the DtEditor widget dialog for searching and replacing text
SYNOPSIS
#include <Dt/Editor.h>
void DtEditorInvokeFindChangeDialog(
Widget widget);
DESCRIPTION
The DtEditorInvokeFindChangeDialog function displays the Find/Change dialog for the DtEditor widget. This dialog enables a user to search
for, and optionally replace, a string in the text for the DtEditor widget. It also allows the user to specify a replacement string, which
can be substituted for either the next occurrence of the search string or all occurrences. The Find/Change dialog remains displayed until
the user closes it. For a complete description of the Find/Change dialog see DtEditor.
Subsequent searches for the last search string entered can be made by calling DtEditorFind(3). Subsequent substitutions can be made with
DtEditorChange(3).
The widget argument specifies the DtEditor widget ID.
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3).
RETURN VALUE
The DtEditorInvokeFindChangeDialog function returns no value.
SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorChange(3), DtEditorFind(3).
DtEditorInvokeFindChangeDialog(library call)