Core iTOps Tube

Monday, 14 May 2012

Printing another column using awk and input data

Hi, I have data of the following type,




Code:


chr1 234 678 39 852 638 abcd 7895

chr1 526 326 33 887 965 kilj 5849


Now, I would like to have something like this




Code:


chr1 234 678 39 852 638 abcd 7895 <a href="http://unix.com/thread=chr1:234-678">Link</a>

chr1 526 326 33 887 965 kilj 5849 <a href="http://unix.com/thread=chr1:526-326">Link</a>


basically, this is nothing but first column separated by a colon ":" and the second and third columns with a hyphen "-".



My files has around 20000 records.



All helps appreciated. Thanks




No comments:

Post a Comment