Hello,
I have a serious problem and I think I can solve it with AWK but I don't know how.
I have a lot of data that looks like this:
graph 12345
using 12345
data 1234
and I want to transform it like this:
each letter of the word becomes a record,
in the record the letter has three letters left and three letters right context so: -,-,-,g,r,a,p (- since there is no context)
and at the end of the record I want the number that corresponds to the letter so the entire record is:
-,-,-,g,r,a,p,1
and the next records:
-,-,g,r,a,p,h,2
-,g,r,a,p,h,-,3
g,r,a,p,h,-,-,4
r,a,p,h,-,-,-,5
I know this isn't something you can answer rightaway but any help is welcome
I have a serious problem and I think I can solve it with AWK but I don't know how.
I have a lot of data that looks like this:
graph 12345
using 12345
data 1234
and I want to transform it like this:
each letter of the word becomes a record,
in the record the letter has three letters left and three letters right context so: -,-,-,g,r,a,p (- since there is no context)
and at the end of the record I want the number that corresponds to the letter so the entire record is:
-,-,-,g,r,a,p,1
and the next records:
-,-,g,r,a,p,h,2
-,g,r,a,p,h,-,3
g,r,a,p,h,-,-,4
r,a,p,h,-,-,-,5
I know this isn't something you can answer rightaway but any help is welcome