All Questions
4 questions
-1
votes
2
answers
73
views
Perl::Find a substring and display a whole word
I have a text file that has some data like:
PADHOGOA1 IOP055_VINREG5_1 ( .IO(VINREG5_1), .MONI(),
.MON_D(px_IOP055_VINREG5_1_MON_D), .R0T(px_IOP054_VINREG5_0_R0T),
.IO1() );
PADV30MA0 ...
1
vote
3
answers
793
views
Perl: Inserting at nth position in file
I have content in my file :
123456789
My output is:
1234CC789
Desired Output is:
1234CC56789
I am insert PP at nth position suppose.
But when I am inserting any text it is inserting the text at ...
-1
votes
3
answers
103
views
Finding the different possible combinations
File A has rows of genes:
A,B,C,D,E
P,Q,R
G,D,V,K
L,Q,X,I,U,G and so on.
Taking each row at a time, how can one get the following type of output:
For the first row:
A,B,C
B,C,D
C,...
4
votes
2
answers
5k
views
Replace lines matching a pattern with lines from another file in order
I want to replace the lines matching a pattern from one file from the lines in order from another file, for example, given:
file1.txt:
aaaaaa
bbbbbb
!! 1234
!! 4567
ccccc
ddddd
!! 1111
we like to ...