summaryrefslogtreecommitdiff
path: root/2021/9.sh
blob: fc736fb4fc393d71e7679b10d880f9acf075e02d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env bash
function post() { sed 's/i\(32\|64\)$//'; }
if [[ $# -ge 1 ]]; then
	if [[ $1 = c ]]; then
		xsel -bo | ./9pre | ./9 | post
	elif [[ $1 = - ]]; then
		./9pre | ./9 | post
	else
		echo >&2 "What are you even doing with your command line params"
		./9pre <9.in | ./9 | post
	fi
else
	./9pre <9.in | ./9 | post
fi