Thanks. It is working for 7th position. Sameway in my another file need to modify 611th postiion
But I am getting below err message
sed: Function s/.\{610\}/& / cannot be parsed.
Hi,
I need to insert strings "0000 00" at the each line within the file.
The postion is 37 to 42.
ex.
name1 name2 0000 00
nam name 0000 00
The "0000 00" in two lines should be lined up.
I don't know why it's not lined up when I posted it.
Can anyone help? (14 Replies)
Hi,
I have a EDI data file ARROWTEST of size 18246 characters. And I want to insert some data after 4200 position in the file. How I can find the position 4200 in that file....Please advise.
Regards, (5 Replies)
Hi All,
I have a flat file with ~ as de-limiter (e.g: aaa~ba a~caa~0~d~e)
What I want is check if the 4th character is 0 and replace it with say 4. So now it becomes : aaa~ba a~caa~4~d~e.
I have to do this for the whole file, but the delimiter position remains the same, not the... (10 Replies)
Hello,
It has been a long time since I have written unix code and I need to insert a variable into the first position of each line in a file. Below is an example of the script and the desired output file
Here is my short script
server="$(hostname)"
df -kg | awk '{print $1, $2, $3, $4,... (3 Replies)
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)
Hi,
i want find the character '-' in a file from position 284-298, if it occurs i need to replace it with 'O ' for the position in the file. How to do that using SED command.
thanks in advance,
Sara (9 Replies)
Hi ,
I have a file which has line similar to below
13123324234234234234234234234234234
3454546456dfhgfhgh454645654asdasfsdsddfgdgdfg
345345345mnmnbmnb346mnb4565464564564645645
Not for each line for specific position I need to insert some '|'
Positions are fixed. Like 3,5,9,11
So the... (5 Replies)
Hi All,
how to insert a '#' in the first position of all the files based on a certain condition.
I tried this:
cat /bin/user/input_file.txt | while read a
do
b=`sed 's/.*song=good.*/\#&/g' $a `
echo $b > /bin/user/new/output_file.txt
done
input_file.txt has list of names of 10... (5 Replies)
Thanks to help from Don Cragun in post 302924174, I'm off and getting into trouble on my own (finally) with sed.
Here is my goal - insert \\r\n at the 60th character on each line and then every 76th character thereafter:
Input:... (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
dteditorgotoline
DtEditorGoToLine(library call) DtEditorGoToLine(library call)
NAME
DtEditorGoToLine -- move the insert cursor for a DtEditor widget to a specified line
SYNOPSIS
#include <Dt/Editor.h>
void DtEditorGoToLine(
Widget widget,
int lineNumber);
DESCRIPTION
The DtEditorGoToLine function moves the insert cursor for the DtEditor widget to the beginning of the line specified by the lineNumber
argument. The cursor can be moved to the last line by specifying DtEDITOR_LAST_LINE as the line number. If the line is not currently on-
screen, the contents for the DtEditor widget are scrolled to display the new insertion position.
The lineNumber argument is the number of the line in the file, counting from 1. If the lineNumber argument is less than 1, the insert cur-
sor is placed at the beginning of the first line. If the argument is greater than the total number of lines, the cursor is placed at the
last line of text.
The insert cursor can be moved to a specific character position with DtEditorSetInsertionPosition(3). The DtNtopCharacter resource can be
used to control which line is displayed at the top of the DtEditor widget.
The widget argument specifies the DtEditor widget ID.
The lineNumber argument specifies the line number within the DtEditor widget.
For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3).
RETURN VALUE
The DtEditorGoToLine function returns no value.
SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorSetInsertionPosition(3).
DtEditorGoToLine(library call)