All pastes #983286 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-04-13 06:29 UTC
rendered paste body
#!/bin/bash
orient=$(xrandr -q --verbose | awk 'NR==2{print $5}') #;echo $var
if ["$orient" = "normal"]; then
        xrandr -o right
elif ["$orient" = "right"]; then
        xrandr -o inverted
elif ["$orient" = "inverted"]; then
        xrandr -o left
elif ["$orient" = "left"]; then
        xrandr -o normal
fi



ERRORS:
zouzou@localhost ~/workspace/misc/shell $ ./auto-rotate.sh
./auto-rotate.sh: line 3: [normal: command not found
./auto-rotate.sh: line 5: [normal: command not found
./auto-rotate.sh: line 7: [normal: command not found
./auto-rotate.sh: line 9: [normal: command not found