Bash copy and paste text in file from one position to another
Hi I have a text file with lines beginning with 71303, 71403, 71602,
I need to copy the 10 digit text at position 30 on lines beginning with 71303 (5500011446) to position 99 on every line beginning with 71602 (see example below),
There may be many 71303 lines but I need the text copying to the next 71602 line it finds then move on to the next 71303 in the file and again copy the text at position 30 to the next 71602 line at position 99
From this:
so that it looks like this:
Hope this makes sense and thank you in advance for any help.
Hello, I'm absolutely new to this world... but I've a problem with a terminal connected via PuTTY (or Termlite) to an AIX 5.1 application.
The problem: I need to paste from clipboard a text containing both input text strings and special keys as ESC, Arrows and so on, to execute in the AIX... (1 Reply)
Dear All,
I am working with windoes OS but remote a linux machine. I wonder the way to copy an paste some part of a huge file in linux machine.
the contain of file like as follow:
...
dump annealling all custom 10 anneal_*.dat id type x y z q
timestep 0.02
run 200000
Memory... (2 Replies)
Hi All,
I have a file like this,
0.0.0.1 /account 327706,Data Cleansing,,,CRM error,100,0
The above line is a comma separted data file. I want to modify the third field
to
The final data file should be like
0.0.0.1 /account 327706,Data Cleansing,,,CRM error,100,0
... (1 Reply)
Hello,
Can anybody please tell me how we can copy and paste text from a word document into a text file that we are editing in vi? Is it possible to do that while we are editing the text file in vi in insert mode?
Thanks, (3 Replies)
Hello All,
i have a really strange copy paste problem. When I write some loops in an editor for example:
for j in 1 2 3
do
echo "$j"
done
and I want to paste it to the shell, the result in the shell is:
for j in 1 2 3; do e;
other commands work fine and if a copy paste... (4 Replies)
I have this text file with a very large number of columns (10,000+) and I want to move the first column to the position of the six column so that the text file looks like this:
Before cutting and pasting
ID Family Mother Father Trait Phenotype
aaa bbb ... (5 Replies)
Hi.
I need to write a script that will allow me to copy data from one position in a line to another position while changing the first 2 bytes of the data to a constant. Here is an example of a line of data before and what it needs to look like after. there are about 200 lines in the file.
... (1 Reply)
Please help me. This is simple, but urgent problem for me. :(
I have a two files
file1
1 2 3 4 5 6
1 2 3 4 5 6
1 2 3 4 5 6
.....
file2
11 12 13 14 15
11 12 13 14 15
11 12 13 14 15
.....
1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
hi,
I have Multiple files with the following data :
File1
100414 DR1
END
XXXXX
Test1 Test2 Test3
Test4 Test5 Test6
END
100514 DR2
END
XXXXX
Test7 Test8 Test9
Test10 Test11 Test12
END
100614 DR3 (5 Replies)
I have a really big XML file. I need copy the value of one tag inside another one tag. I try to publish one example.
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1">Rai 1</channel>
<channel update="i" site="merge-xmltv" site_id="" xmltv_id="Rai 1 +2HD">Rai 1... (6 Replies)
Discussion started by: Tapiocapioca
6 Replies
LEARN ABOUT OSF1
xmtextsetsource
XmTextSetSource(3X)XmTextSetSource(3X)NAME
XmTextSetSource - A Text function that sets the source of the widget
SYNOPSIS
#include <Xm/Text.h>
void XmTextSetSource (widget, source, top_character, cursor_position)
Widget widget;
XmTextSource source;
XmTextPosition top_character;
XmTextPosition cursor_position;
DESCRIPTION
XmTextSetSource sets the source of the Text widget. Text widgets can share sources of text so that editing in one widget is reflected in
another. This function sets the source of one widget so that it can share the source of another widget.
Setting a new text source destroys the old text source if no other Text widgets are using that source. To replace a text source but keep it
for later use, create an unmanaged Text widget and set its source to the text source you want to keep. Specifies the Text widget ID Speci-
fies the source with which the widget displays text. This can be a value returned by the XmTextGetSource(3X) function. If no source is
specified, the widget creates a default string source. Specifies the position in the text to display at the top of the widget. This is an
integer number of characters from the beginning of the text buffer. The first character position is 0. Specifies the position in the text
at which the insert cursor is located. This is an integer number of characters from the beginning of the text buffer. The first character
position is 0.
For a complete definition of Text and its associated resources, see XmText(3X).
SEE ALSO XmText(3X)XmTextSetSource(3X)