repo.or.cz
/
aoc_eblake.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
day 5 part 2
[aoc_eblake.git]
/
2015
/
advent8.sh
blob
0c3aede0db4d3940a1f00c9ca46ee7c508e20565
1
[[
$#
==
1
]]
||
{
echo
"missing filename"
;
exit
1
; }
2
echo
$
((
$
(
wc
-c
<
$1
) -
3
$
(
sed
's/
\\
[
\"
]/B/g; s/
\\
x../?/g; s/^"//; s/"$//'
<
$1
|
wc
-c
) ))
4
echo
$
((
$
(
sed
's/[
\"
]/
\\\\
/g; s/^/"/; s/$/"/'
<
$1
|
wc
-c
) -
$
(
wc
-c
<
$1
) ))