Kent West <[EMAIL PROTECTED]> writes:
> if {the first word of "uname -a" is Linux}
> then echo "You're logging into Linux"
> else
> echo "You're logging into something else, probably Solaris"
> fi
For yet another approach:
case `uname -a` in
Linux*)
echo "You're logging into Linux"
;;
*)
echo "You're logging into something else, probably Solaris"
;;
esac
Which has the minor advantage of only using shell primitives, aside
from the call out to uname itself.
--
David Maze [EMAIL PROTECTED] http://people.debian.org/~dmaze/
"Theoretical politics is interesting. Politicking should be illegal."
-- Abra Mitchell
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]