in reply to Replace bits
perl -pe 's/^(..)H/${1}1/; s/^(.{7})L/${1}0/;' input > output
The output is different on line 4, it prints
HH1HHHHH
Explanation:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Replace bits
by newbiecali (Initiate) on Mar 30, 2015 at 23:30 UTC | |
by AnomalousMonk (Archbishop) on Mar 31, 2015 at 01:00 UTC |