It is currently Fri, 15 Oct 2021 21:39:23 GMT

Author Message
 Help to convert ksh function to tcsh or csh
Is there any way in csh or tcsh to emulate a function from ksh?  I looked
through the FAQ, and I didn't see this question addressed anywhere.  The
systems at my school all default to ksh, but I prefer tcsh, and am having to
convert all of my login files and script.  The main thing I want is out of the
system-wide profile; a 'term' function.  I tried using an alias, but I couldn't
get it to work.  Here is the ksh code:

        if [ ! -z "$1" ];then TERM=$1;fi
        set -f;
        while :
          eval $(tset -s -Q -m "plugboard:?${DEFAULT_TERM:-ansi}" \
                            -m "network:?${DEFAULT_TERM:-ansi}" \
                            -m "unknown:?${DEFAULT_TERM:-ansi}" \
                            -m "sun:sun");
          if [ "$TERM" != "unknown" ];then break;fi
        done; set +f
        eval $(echo $TERMCAP |
        awk -F: '{ for (i = 0; i <= NF; i++)
          ct[substr($i,1,2)] = substr($i,4,length($i)-3) }
          END { printf ("export LINES=%s COLUMNS=%s\n", ct["li"], ct["co"]) }' )
        stty erase   kill  intr  rows $LINES cols $COLUMNS

It comes from a Sun IPX, version 4.1.1.  Any help will be MUCH appreciated!
Chris Adams                       | "If tin whistles are made of tin,
Georgia Tech                      |  what do they make foghorns from?"
Internet:|       --  Lonnie Donegan

 Tue, 04 Apr 1995 18:20:07 GMT   
   [ 1 post ] 

Similar Threads

1. Help to find a good book on csh/tcsh to teach myself csh/tcsh script

2. help converting csh script to ksh?

3. Need Help Converting csh stuff to ksh

4. automatic converting scripts from csh/tcsh to bash

5. ksh to csh and/or csh to ksh

6. converting from csh to ksh

7. Convert ksh to csh

8. csh & ksh varible convert

9. converting csh script to ksh

10. Converting csh aliases to ksh

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software