Similar questions have already been asked and answered here. Right at the bottom on this thread you'll find these threads.
Check ...
Let us know if you could adjust it for your requirement or if you need further help
Quote:
Originally Posted by pilnet101
If you are using bash, there is no need to call any external tools to perform this. You can use parameter expansion alone as per below:
hi thanks for the replies,
i find this will work (im not at hp-ux environment at the moment, so i try on ubuntu server)
what if file contain more than 2 millions line is still fine if i do above command ?
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)
I am trying to use sed to replace specific characters at a specific position in the file with a different value... can this be done?
Example:
File:
A0199999123
A0199999124
A0199999125
Need to replace 99999 in positions 3-7 with 88888.
Any help is appreciated. (5 Replies)
Hello. I'm trying to delete one character in determinate position.
Example:
qwEtsdf123Ecv34
<delete character in positión 3>
Result:
qwtsdf123Ecv34
Plase, help me.
Thanks (4 Replies)
Hi,
I have a file like this (about 8 columns in total, this being the 2nd column)
gi_49482297_ref_YP_039521.1_
gi_49482297_ref_YP_039521.1_
gi_49482315_ref_YP_039539.1_
gi_49482315_ref_YP_039539.1_I want to remove the _ at the end of the line.
And at later stages I would want to replace the... (5 Replies)
Goodmorning,
I know how to cut a string and a column, and how to find a word.
I have a file with over 100 columns. All columns have a title in the first line. I have to delete all columns with the XXX title.
I can't use cut -f because the position of XXX columns change in each file, and in... (14 Replies)
Discussion started by: echo manolis
14 Replies
9. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT HPUX
dteditorgetlastposition
DtEditorGetLastPosition(library call) DtEditorGetLastPosition(library call)
NAME
DtEditorGetLastPosition -- retrieve the position of the last character in a DtEditor widget
SYNOPSIS
#include <Dt/Editor.h>
XmTextPosition DtEditorGetLastPosition(
Widget widget);
DESCRIPTION
The DtEditorGetLastPosition function accesses the last text position in the DtEditor widget. The position is an integer number of charac-
ters from the beginning of the widget's buffer. Any text added to the end of the buffer is added after this position. The first character
position is zero. The last character position is equal to the number of characters contained in the widget.
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
Upon successful completion, the DtEditorGetLastPosition function returns an XmTextPosition value that indicates the last position in the
text; otherwise, it returns NULL.
APPLICATION USAGE
The position information is given in terms of characters, which may differ from the byte position when multi-byte code sets are in use.
SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorGetInsertionPosition(3), DtEditorSetInsertionPosition(3).
DtEditorGetLastPosition(library call)