summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-12-13 23:10:23 +0100
committerTom Smeding <tom@tomsmeding.com>2021-12-13 23:10:23 +0100
commit026fbe8686417faa3e13e01dfd738631813d6ecb (patch)
treefc07fba6ba99fbecd12fa0e2b56b902d6603d290
parenta2badabe58116509960ad3406b2126e6d3c500c2 (diff)
Remove Futhark type suffix in output of 9
-rwxr-xr-x2021/9.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/2021/9.sh b/2021/9.sh
index 739d62d..fc736fb 100755
--- a/2021/9.sh
+++ b/2021/9.sh
@@ -1,13 +1,14 @@
#!/usr/bin/env bash
+function post() { sed 's/i\(32\|64\)$//'; }
if [[ $# -ge 1 ]]; then
if [[ $1 = c ]]; then
- xsel -bo | ./9pre | ./9
+ xsel -bo | ./9pre | ./9 | post
elif [[ $1 = - ]]; then
- ./9pre | ./9
+ ./9pre | ./9 | post
else
echo >&2 "What are you even doing with your command line params"
- ./9pre <9.in | ./9
+ ./9pre <9.in | ./9 | post
fi
else
- ./9pre <9.in | ./9
+ ./9pre <9.in | ./9 | post
fi