summaryrefslogtreecommitdiffstats
path: root/noise
diff options
context:
space:
mode:
authorkrebs <krebs@fuerkrebs>2011-09-09 21:29:15 -0400
committerkrebs <krebs@fuerkrebs>2011-09-09 21:29:15 -0400
commit9c9e9809e61e5e6a45c5f5babd0fef17cdc1d33d (patch)
tree115741ba705a7ab09b453aaa4323fad355105401 /noise
parent8712dfa17f0dd7b90c646e13d2cd4e0d4c5a11e6 (diff)
//noise /temp: compress space
Diffstat (limited to 'noise')
-rwxr-xr-xnoise/modules/temp33
1 files changed, 10 insertions, 23 deletions
diff --git a/noise/modules/temp b/noise/modules/temp
index 3c364acd..a11c3720 100755
--- a/noise/modules/temp
+++ b/noise/modules/temp
@@ -3,26 +3,18 @@
temper=/krebs/temper/temper
main() {
- case "$1" in
+ case "${1--K}" in
(--help)
echo "report temperature in K, °C, °R, or °F."
exit
;;
- (-C|--celsius)
- unit='Grad Zelsius'
- formula='x - 273.15'
- ;;
- (-F|--fahrenheit)
- unit='Grad Fahrenheit'
- formula='x * 9/5 - 459.67'
- ;;
- (-R|--rankine)
- unit='Grad Renkin'
- formula='x * 9/5'
- ;;
- (-K|--kelvin|*)
- unit='Kelvin'
- formula=x
+ (-C|--celsius) unit='Grad Zelsius' ; formula='x - 273.15' ;;
+ (-F|--fahrenheit) unit='Grad Fahrenheit'; formula='x * 9/5 - 459.67' ;;
+ (-R|--rankine) unit='Grad Renkin' ; formula='x * 9/5' ;;
+ (-K|--kelvin) unit='Kelvin' ; formula='x' ;;
+ (*)
+ echo 'Error 1: you are made of stupid!'
+ exit 23
;;
esac
if test -f $temper -a -x $temper; then
@@ -43,13 +35,8 @@ outside_temp() {
` + 273.15; ${1-x}" | bc
}
-espeak_inside() {
- echo Die Krebs-tempera-tur beträgt $@ | to_espeak
-}
-
-espeak_outside() {
- echo Die Außen-tempera-tur beträgt $@ | to_espeak
-}
+espeak_inside() { echo Die Krebs-tempera-tur beträgt $@ | to_espeak; }
+espeak_outside() { echo Die Außen-tempera-tur beträgt $@ | to_espeak; }
to_espeak() {
sed '