This might not work for solaris awk. I know it works for GNU awk. > > >TTY=`tty | cut -c 6-` >who | grep $TTY | awk 'BEGIN { FS="(" } {print $2}' | cut -d . -f 1 > who|grep $TTY |awk -F "(" '{print$2}"| cut -d . -f 1