I have this variable whose length should always be 9 characters
Then i created the length variable as
What i want to do is to start from the PEPTIDE_SEQ and output to file a block like this:
AAAAAAAAA CAAAAAAAA DAAAAAAAA EAAAAAAAA FAAAAAAAA GAAAAAAAA HAAAAAAAA IAAAAAAAA KAAAAAAAA LAAAAAAAA MAAAAAAAA NAAAAAAAA PAAAAAAAA QAAAAAAAA RAAAAAAAA SAAAAAAAA TAAAAAAAA VAAAAAAAA WAAAAAAAA YAAAAAAAA
Excluding characters B,J,O,U,X,Z, I was able to only repeat the PEPTIDE variable and output it to a file using this code
while [ $i -le 20 ] do printf '%*s\n' "$len" | tr ' ' "$PEPTIDE_SEQ" >> demo.txt i=$(( i+1 )) # increments $i done
how can I be able to simulate that block of code either using sed or awk? and then create another block of code but this time replacing the second letters then repeat the loop for the third block replacing the third letters and so forth.