Thread: Script Help
View Single Post
Old 07-14-2011, 06:05 PM   #1
DrD2009
Member
 
Location: Kansas City

Join Date: Oct 2009
Posts: 88
Default Script Help

Hello everyone,

I've been racking my brain trying to create a script to make a certain file, but I have had no success in my attempts.

I have a file like this:
Code:
ACGCCGGCCA
GTGAATTGTA
ATACGACTCA
CTATAGGGCG
AATTGGGCCC
TCTAGATG
All I want to do is to create a file like the following:
Code:
1	ACGCCGGCCA
11	GTGAATTGTA
21	ATACGACTCA
31	CTATAGGGCG
41	AATTGGGCCC
51	TCTAGATGCA
61	TGCTCGAGCG
71	GCCGCCAGTG
It should be something relatively easy I'm just really missing. I've been trying it using awk, but have had little luck.

I believe it is basically just this code:
Code:
awk '{print NR?????? "\t" $0}'
I'm just not sure what the ??????????? should be. Any help with this would be great. Thanks in advance.
DrD2009 is offline   Reply With Quote