summary refs log tree commit diff homepage
path: root/2018/day02-1.sh
blob: 695959f0f86b76e01d9658f3c582e0c4b5293d3e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
alpha='a b c d e f g h i j k l m n o p q r s t u v w x y z'
twos() {
	for a in $alpha; do
		tr -c -d "$a\n" < $1 \
			| grep -n '^..$' \
			| cut -d ':' -f 1
	done | sort -u | wc -l
}
threes() {
	for a in $alpha; do
		tr -c -d "$a\n" < $1 \
			| grep -n '^...$' \
			| cut -d ':' -f 1
	done | sort -u | wc -l
}
input=$(mktemp)
cat > $input
echo $(( $(twos $input) * $(threes $input) ))
rm $input
965477b75bf2c9b54b0&follow=1'>Finish configuring xtermJune McEnroe 2021-02-06Enable tapping, reverse scroll, set scaling in wsconsctlJune McEnroe 2021-02-06Set root window to black on purple snowJune McEnroe 2021-02-06Add xmodmap configurationJune McEnroe 2021-02-06Add initial OpenBSD X configurationJune McEnroe cwm still needs a lot more rebinding, and I need to actually look at its other options. xterm definitely still needs some configuration, but I at least managed to get it to use a decent looking font. Very happy that OpenBSD includes Luxi Mono, which is what my usual font, Go Mono, is based on anyway. Still missing is xmodmap and such. 2021-02-06Add xterm output to schemeJune McEnroe