tset -I Question on DU4.0B

From: <jeffrey.s.horvath_at_ccmail.census.gov>
Date: Tue, 05 May 1998 17:16:26 -0500

     The following code is part of my .profile script. I'm on DU4.0B using
     ksh and would like to set my erase key to either Delete or Backspace.
     The erase key changes for different terminal emulators and is either
     one or the other.
     
     However, this code DOESN'T work because I'm unable to redirect output
     with the "test -I" command.
     
     Does anyone know why or different way to identify the erase character
     and then set it?
     
      
     
     
     temp=$(tset -I |awk 'NR==1 {print $3}')
     #Following will set erase for both terminal types
     print "temp is $temp"
     if [[ $temp = "Delete" ]]; then
     print "Setting stty"
        stty erase ^H
     else
        stty erase ^?
     fi
     
     
     Thanks,
Received on Tue May 05 1998 - 23:19:21 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT