this may look easy.. infact the first time I tried it last year right when i first started to use linux it worked.. on one of the linux systems that I have had.. I have had 4 systems include this one 3 old laptops to expriment with an o.k desktop and now a new HP pavillion laptop finally to work on bigger things.. but after trying the programm the first time, the second and third time i got confused.
# ! /bin/sh
# .filename
script 1
function print () { clear; pwd; date; tty; }
`tty`="TTY"
if [ $TTY = "/dev/pts/3 ]
then
print
echo "experimental terminal"
else
print
fi
script 2 (of several )
{ clear; pwd; date; tty; `tty`="TTY" | awk '{if($0 == /dev/pts/3)print "experimental terminal"}; }
or
function print () { clear; pwd; date; tty; }
if ($PWD == such and such dir)
then
print
echo " experimental terminal" >/dev/pts/3
else
print'
fi