I have two files X.txt and Y.txt. The file format of X.txt is :
and second file Y.txt is of the format:
In Y.txt file , there are some texts units separated by two "|" (i.e.,madra|s|nsubj ) and some texts are separated by one "|" (i.e., also|advmod).
Considering the two files , the expected output is :
In the final output file, all texts units separated by three "|" (i.e., madras|madra|s|nsubj).
To obtain the expected output file, for each texts unit separated by two "|" in Y.txt file, the first corresponding words is copied from X.txt and separated by "|" with the word from Y.txt file (i.e., madras|madra|s|nsubj) from the corresponding location of the corresponding sentence. And for each texts units separated by one "|" in Y.txt file, the corresponding word with "|empty" string is inserted in between the string separated by "|" (i.e., is|is|empty|cop)
I want to write a Perl script on this.
Thanks in advance.
Hello Everyone ,
Iam a newbie to shell programming and iam reaching out if anyone can help in this :-
I have two files
1) Insert.txt
2) partition_list.txt
insert.txt looks like this :-
insert into emp1 partition (partition_name)
(a1,
b2,
c4,
s6,
d8)
select
a1,
b2,
c4, (2 Replies)
Hi,
I am trying different scenarios now, 1 of those is getting the text between the following 2 strings.
Type of msg: -in_full
>date
>alr text
>ID_on_exit
AWXX-Ready to commit (98) msg type: (10)
I need to get all the occurrences having the same start line and end line.... (6 Replies)
Hallo Everyone.
I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text.
I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern>
... (5 Replies)
Hi I have something like this:
EXAMPLE 1
CREATE UNIQUE INDEX "STRING_1"."STRING_2" ON "BOSNI_CAB_EVENTO"
("CD_EVENTO" , "CD_EJECUCION" ) PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 5242880 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "DB1000_INDICES_512K"... (4 Replies)
Hey guys how do I compare 2 strings from the text file,
and check for duplication?
For example, I add an item call Laptop, it will record to the textfile call file.
If it detects duplicate it will say the record record exist?
file.txt contains
Laptop:Sony:1000
Phone:Apple:30
A head... (4 Replies)
Hi,
I want to extract some text between two strings in a line i am using following command i.e;
awk '/-string1/,/-string2/' filename
contents of file is---
line1
line2
aaa -bbb -ccc -string1 c,d,e -string2
line4
but it is showing complete line which is having searched strings.
aaa... (19 Replies)
Well, to make another post at this helpful forum :b::D:
I recently tried something like this, I want to replace all those numberings/letters that are located
between <string>file://localhost/var/mobile/Applications/ and /Documents/</string>
numberings =----
replace with:
first... (6 Replies)
Hi,
I've looked at a few existing posts on this, but they don't seem to work for my inputs.
I have a text file where I want to extract all the text between two strings, every time that occurs.
Eg my input file is
Anna said that she would fetch the bucket.
Anna and Ben moved the bucket.... (9 Replies)
Hi Im trying to write a script that compare a text string.
But it fails, I think it adds a extra line feed to the result and fails beacuse of that.
The script.
DT=`date +'%Y%m%d%H%M%S'`
#ALARM_BIN=/users/alarms/ssa/alarms/bin
QUEUE_THR=10
#unset offset
#offset="***Server reports data... (3 Replies)
Hi all,
I have a directory containing many subdirectories each named like KOG#### where # represents any digit 0-9. There are several files in each KOG#### folder but the one I care about is named like KOG####_final.fasta. I am trying to write a script to copy all of the KOG####_final.fasta... (3 Replies)