![](https://seccdn.libravatar.org/avatar/728bec224f00aa8665cda0c8ff17a835.jpg?s=120&d=mm&r=g)
On 10/6/05, Chadley Wilson <chadley@ngn.co.za> wrote:
Greetings
I wonder who can solve this riddle, :) he he
[snipped lot's of useful introductory information]
it should read if term is not linux and is not a tty? or pts? then (run text version or exit or something ... I haven't decided yet!)
STERM=`tset -q` TTERM=`tty`
if [[ ! $STERM == linux && $TTERM != /dev/tty? || $TTERM != /dev/pts/? ]]; then
I am not a bash guru, but since the == and || operators have equal precedence the last evaluation is ignored because the first two short circuits the last one (as can be seen in the C programming language). Try this: if [[ ! $STERM == linux && ($TTERM != /dev/tty? || $TTERM != /dev/pts/?) ]]; I usually don't do shell scripting so I cannot comment on the overall approach, but I hope this helps a bit. Cheers \Steve