From f71ffff02372a48125a6cc64b9be16c4167f0e4a Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Sat, 2 Jan 2021 20:15:10 +0100 Subject: [PATCH] bash cleanup. --- day15/ex1.bash | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/day15/ex1.bash b/day15/ex1.bash index fad0c57..821b339 100755 --- a/day15/ex1.bash +++ b/day15/ex1.bash @@ -9,30 +9,6 @@ declare -A prev declare -i cur=1 previous -function print_binary() { - local -i num=$1 exp - local str="" format="%0${2}d" - - for ((exp=1; num>exp; exp<<=1)); do - if ((num & exp)); then - str=1"$str" - else - str=0"$str" - fi - echo " str=$str" - done - printf "$format" $str -} - -function print_array() { - local -i i - - printf "nums:\n" - for i in "${!prev[@]}"; do - printf " prev[%d] => %d\n" "$i" "${prev[$i]}" >&2 - done -} - TARGET=$1 IFS="," read -r line