summary refs log tree commit diff
path: root/home/.local/bin/deg
diff options
context:
space:
mode:
Diffstat (limited to 'home/.local/bin/deg')
-rwxr-xr-xhome/.local/bin/deg6
1 files changed, 6 insertions, 0 deletions
diff --git a/home/.local/bin/deg b/home/.local/bin/deg
new file mode 100755
index 00000000..216029ed
--- /dev/null
+++ b/home/.local/bin/deg
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -eu
+cat <<EOF
+${1}°F = $(dc -e "1k $(echo "$1" | sed 's/^-/_/') 32-1.8/p")°C
+${1}°C = $(dc -e "1k $(echo "$1" | sed 's/^-/_/') 1.8*32+p")°F
+EOF