12-20-2010
awk '{if(!a[$2]) print;a[$2]++;}' inPutfile
This User Gave Thanks to anurag.singh For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My input file:
AVI.out <detail>named as the RRM .</detail>
AVI.out <detail>Contains 1 RRM .</detail>
AR0.out <detail>named as the tellurite-resistance.</detail>
AWG.out <detail>Contains 2 HTH .</detail>
ADV.out <detail>named as the DENR family.</detail>
ADV.out ... (10 Replies)
Discussion started by: patrick87
10 Replies
2. Shell Programming and Scripting
Input file:
>position_10 sample:68711 coords:5453-8666 number:3 type:complete len:344
MSINQYSSDFHYHSLMWQQQQQQQQHQNDVVEEKEALFEKPLTPSDVGKLNRLVIPKQHA
ERYFPLAAAAADAVEKGLLLCFEDEEGKPWRFRYSYWNSSQSYVLTKGWSRYVKEKHLDA
NRTS*
>position_4 sample:68711 coords:553-866 number:4 type:partial len:483... (7 Replies)
Discussion started by: patrick87
7 Replies
3. Shell Programming and Scripting
Input file:
hcmv-US25-2-3p hsa-3160-5
hcmv-US33 hsa-47
hcmv-UL70-3p hsa-4508
hcmv-UL70-3p hsa-4486
hcms-US25 hsa-360-5
hcms-US25 hsa-4
hcms-US25 hsa-458
hcms-US25 hsa-44812
.
.
Desired Output file:
hcmv-US25-2-3p hsa-3160-5
hcmv-US33 hsa-47
hcmv-UL70-3p hsa-4508
hsa-4486... (3 Replies)
Discussion started by: perl_beginner
3 Replies
4. Shell Programming and Scripting
Input file
data_1 10 US
data_1 2 US
data_1 5 UK
data_2 20 ENGLAND
data_2 12 KOREA
data_3 4 CHINA
.
.
data_60 123 US
data_60 23 UK
data_60 45 US
Desired output file
data_1 10 US
data_1 5 UK
data_2 20 ENGLAND
data_2 12 KOREA (2 Replies)
Discussion started by: perl_beginner
2 Replies
5. Shell Programming and Scripting
Input file:
CCNI data564_input1 264
CORO1A data564_input2 155
ABC-B data17_input1 3466
ABC-B data17_input2 1133
ABC-B data17_input3 2162
ABC-B data17_input4 2019
HNRNPA2B1 data95_input1 101
HNRNPA2B1 data95_input2 340
IFITM1 data105_input2 291
IFITM2 data105_input1 505... (3 Replies)
Discussion started by: cpp_beginner
3 Replies
6. Shell Programming and Scripting
Input file:
A_69510335_ASD>aw 1199470 USA
A_119571157_C>awe,QWEQE 113932840 USA
C_34646666_qwe>TAWTT,G,TT 112736796 UK
C_69510335_QW>T 1199470 USA
D_70520237_WR>QEE,G 34459863 UK
D_71380003_QWR>T 145418226 IK
.
Desired output:
A_69510335_ASD>aw 1199470 USA... (1 Reply)
Discussion started by: perl_beginner
1 Replies
7. Shell Programming and Scripting
Input file:
#data_131 0 >content..._* 1 >content..._at_+/97.20%
#data_137 0 >content..._* 1 >content..._at_+/97.20% 2 >seq..._* 3 >content..._at_+/97.20% 4 >content..._at_+/97.20%
#data_141 0 >content..._*
#data_150 0 >content..._* 1 >content..._at_+/97.20% 2 >seq..._* 3... (3 Replies)
Discussion started by: perl_beginner
3 Replies
8. Shell Programming and Scripting
I am in the process of developing a perl cgi page.
I had succeeded in developing the page but there are few errors/issues with the page.
description about cgi page:
My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies
9. Shell Programming and Scripting
Here is the contents of test.txt
Dependencies Resolved
Changes in packages about to be updated:
ChangeLog for: 1:perl-Archive-Extract-0.38-131.el6_4.x86_64,
- Resolves: #915692 - CVE-2013-1667 (DoS in rehashing code)
Dependencies Resolved
Changes in packages about to be updated:
... (5 Replies)
Discussion started by: ashokvpp
5 Replies
10. Shell Programming and Scripting
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Discussion started by: hemanthsaikumar
2 Replies