[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MiNT bug
On Fri, 27 Mar 1998, Martin-Eric Racine wrote:
>I was just writing this simple script, and it seems MiNT
>(or the shell?) doesn't understand the $TTY variable:
>
>--------/usr/etc/ttylog--------
>#!/bin/sh
>echo "MiNT 1.14 ("$HOSTNAME") ("$TTY")"
>exec tail -f /var/log/syslog
>#end
change it into:
echo "MiNT 1.14 ("$HOSTNAME") (`tty`)"
the ` character implies the result of the command.
(in my own words ;)
example variable = `gnu -v`
the variable called later by $variable will contain the info you
wanted, example:
echo $variable
gnu c version 2.7.2
tty in our case is a program that will fetch the current tty, in some
extent, like if ran from cron or some other daemons, it might not be
able to fetch the current tty, because it is not really using the tty,
I don't know the trick here.
example. from cron., as a test I would like a echo "still here" >`tty`
Of course this will have some prob. It would be good to have like a
variable to show what vcons is actually used (toped?).
like a current_vcons variable that will return vcons used at the time.
bye.
________________________________________________________________________________
Email:Kellis@primenet.com
Web http://www.primenet.com/~kellis/
________________________________________________________________________________
- References:
- MiNT bug
- From: q-funk@megacom.net (Martin-Eric Racine)