-
-
Save thcipriani/915b47d59308db2bd9ea8a70e6719b1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
printf '%s°C\n' "$(units "tempF($@)" 'tempC' | xargs)" | |
printf '%s°F\n' "$(units "tempC($@)" 'tempF' | xargs)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It should be noted that this doesn't work with macOS' built-in
units
. It will work withgnu-units
though.