[comp.unix.questions] escape key

coleman@cam.nist.gov (Sean Sheridan Coleman X5672) (11/07/90)

According to the console man pages, you can issue 
certain escape sequences to do various things to the
screen. Is there a way to issue an escape sequence from
the keyboard or is it soley used for programming such as
termcap?

In the SUNVIEW beginners guide, there are some tty 
escape sequences that you can issue using the echo command.

For instance, it states that to put the present path 
in the header of the window, you type
echo -n "^[]l\!*^[\" pwd.

When I issue the command, I get back the string ^[]l\!*^[\ 
not the pwd in the header.

How do you issue that escape string?


Sean Coleman
NIST
Boulder, CO

coleman@bldrdoc.gov

ellis@motcid.UUCP (John T Ellis) (11/07/90)

In article <5679@alpha.cam.nist.gov> coleman@cam.nist.gov (Sean Sheridan Coleman X5672) writes: 

[text deleted]
>
>When I issue the command, I get back the string ^[]l\!*^[\ 
>not the pwd in the header.
>
>How do you issue that escape string?

Here is what I use in my .cshrc file:

	alias cd 'cd \!* ; set l = `dirs` ; echo -n "^[]l$l^[\"; unset $l;'

It sounds to me as if your system is not interpreting the escape sequence
properly.  When you enter this, either at the command line or in some script
file, do the following:

     1. ctrl V         
     2. escape        esc
     3. right bracket ]
     4. small l       l
     5. dollar l      $l
     6. ctrl V 
     7. backslash     \


This should work.  If it doesn't, let me know and I'll try and work something
else out.

Regards.

John
-- 
-------------------------------+------------------------------------------------
  John T. Ellis 708-632-7857   | Line Printer paper is strongest
       Motorola Cellular       |      at the perforations. 
 motcid!ellis@chg.mcd.mot.com  |