#!/bin/bash
# Advent of Code 03 p1
for n in {1..12}; do
l0=$(eval cut -c$n "$1" | sort | grep 0 | uniq -c | xargs | cut -d' ' -f1)
l1=$(eval cut -c$n "$1" | sort | grep 1 | uniq -c | xargs | cut -d' ' -f1)
if [[ $l0 -gt $l1 ]]; then printf -- "0"; else printf -- "1"; fi
done
printf -- "\n"
echo '-> manually convert to decimal, convert reversed to decimal and multiply'
8b960f3
Add jungle_doodads - ChillerDragonDoClearableEditBox
from menus and editor to CUIEx
.
Various minor refactoring.