-
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env awk
|
#!/usr/bin/env awk
|
||||||
|
|
||||||
|
# Just pre-compute all possible results
|
||||||
|
# and check against the sum
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
FS = "[: ]"
|
FS = "[: ]"
|
||||||
total = 0
|
total = 0
|
||||||
|
@ -13,10 +13,10 @@ do
|
|||||||
LINE="$(
|
LINE="$(
|
||||||
for (( i=0; i<${#MAP_ARRAY[@]}; i++ ))
|
for (( i=0; i<${#MAP_ARRAY[@]}; i++ ))
|
||||||
do
|
do
|
||||||
if [[ ${MAP_ARRAY[i]} == "$CHAR" ]]
|
if [[ ${MAP_ARRAY[i]} == "$CHAR" ]]
|
||||||
then
|
then
|
||||||
printf "%s " "$i"
|
printf "%s " "$i"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
)"
|
)"
|
||||||
printf "%s\n" "$LINE" >&2
|
printf "%s\n" "$LINE" >&2
|
||||||
|
Reference in New Issue
Block a user