Prova:
$ awk '{print $1; for (i=1;i<=length($2);i=i+60) print substr($2,i,60)}' file
>Directory1/file3
CTTSCCCTTTTTSEEEEECGGGSCEEEEECCCSSBCCCSCCCCCTTTCCCCCCCCSCBCC
CCCCCCSCTTSCCCTTTTTSEEEEECGGGSCEEEEECCCSSBCCCSCCCCCTTTCCCCCC
CCSCBCCCCCCCCSCTTSCCCTTTTTSEEEEECGGGSCEEEEECCCSSBCCCSCCCCCTT
TCCCCCCCCSCBCCCCCCCCS
>Directory1/file4
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAA
Come funziona:
-
print $1
Questo stampa il primo campo sulla riga.
-
for (i=1;i<=length($2);i=i+60) print substr($2,i,60)
Per il secondo campo sulla riga, stampiamo 60 caratteri alla volta finché non raggiungiamo la fine del campo.
Puoi usare GNU coreutils fold
:
fold -w60 file