You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
164 B
22 lines
164 B
5 years ago
|
#!/usr/bin/gawk -f
|
||
|
|
||
|
BEGIN {
|
||
|
fix = 0
|
||
|
}
|
||
|
|
||
|
NR == 3 && /^0$/ {
|
||
|
fix = 1
|
||
|
print "1"
|
||
|
next
|
||
|
}
|
||
|
|
||
|
fix == 0 {
|
||
|
print
|
||
|
next
|
||
|
}
|
||
|
|
||
|
fix == 1 {
|
||
|
gsub(/\x00/, "\x01", $0)
|
||
|
print $0
|
||
|
}
|