...I just try your perl code.
It gives the following output result:
It seems like lack of the "- 2" ?
...
I don't know why it doesn't show "- 2" in your terminal. There is no way for me to see your terminal from here. So unless you provide me more information, I cannot say why it fails in your terminal.
In my post, I showed my input file "f26". Then I showed and execute the Perl one-liner. And then you can see the results and see that it works as expected. All the information you ever wanted to know about the problem and the solution is there. The information is self-contained, i.e. it's complete in itself. You have to do the same to help me help you.
Otherwise it's like asking on the Internet - "my car is not working; what's the problem?" I doubt if anyone can answer that question on the Internet, given that amount of information.
Do the following -
(1) Post the content of your input file using the following command:
(2) Post the script that you executed. If it is in a file, post the content of that file using the "cat" command shown above.
(3) Execute your script, feeding the input file to it. Then copy the entire execution and resultset from your terminal and paste it over here.
Input file
data_2 USA
data_2 JAPAN
data_3 UK
data_4 Brazil
data_5 Singapore
data_5 Indo
data_5 Thailand
data_6 China
Desired output file
data_2 USA/JAPAN
data_3 UK
data_4 Brazil
data_5 Singapore/Indo/Thailand
data_6 China
I would like to merge all data content that share same... (2 Replies)
I have a file which have data like
A.txt
a
1Jan I am in a1.
1Jan I was born.
2Jan I am here.
3Jan I am in a3.
b
1Jan I am in b1.
c
2Jan I am in c2.
d
2Jan I am in d2.
5jan I am in d5.
date in the file might be vary evertime. (9 Replies)
Can anyone help me with a shell script that can do the following:
I have a data in fasta format (first line is the header, followed by a sequence of characters).
>ALLLY
GGCCCCTCGAGCCTCGAACCGGAACCTCCAAATCCGAGACGCTCTGCTTATGAGGACCTC
GAAATATGCCGGCCAGTGAAAAAATCTTGTGGCTTTGAGGGCTTTTGGTTGGCCAGGGGC... (5 Replies)
I am new to Perl. I need to reformat a data file as the last part of a script I am working on. I am stuck on this.
Here is the current format:
CUSTOMER Filename 09/04/07-08:49
CUSTOMER Filename 09/04/07-08:52
CUSTOMER Filename 09/04/07-08:52
CUSTOMER2 Filename 09/04/07-08:49
CUSTOMER2... (3 Replies)
I am trying to write an awk program to reformat a data table and convert the date to julian time. I have all the individual steps working, but I am having some issues joing them into one program. Can anyone help me out? Here is my code so far:
# This is an awk program to convert the dates from... (4 Replies)