summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xhome/.local/bin/deg4
1 files changed, 2 insertions, 2 deletions
diff --git a/home/.local/bin/deg b/home/.local/bin/deg
index e1781300..216029ed 100755
--- a/home/.local/bin/deg
+++ b/home/.local/bin/deg
@@ -1,6 +1,6 @@
 #!/bin/sh
 set -eu
 cat <<EOF
-${1}°F = $(dc -e "1k ${1} 32-1.8/p")°C
-${1}°C = $(dc -e "1k ${1} 1.8*32+p")°F
+${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
c/commit/install.sh?id=3dbba9a058ddd604c714d12e1f53977e747bb58a&follow=1'>Add OpenBSD to install.shJune McEnroe 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe