perl -pe 's/^(..)H/${1}1/; s/^(.{7})L/${1}0/;' input > output
The output is different on line 4, it prints
HH1HHHHH
Explanation:
In reply to Re: Replace bits
by choroba
in thread Replace bits
by newbiecali
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |