This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: grotesque newbie question about echoing escape sequences


DJ Delorie wrote:
> 
> >       <ESC>]2;foobar^G
> >
> > but I can't figure out the right way to say it.   Help?
> 
> bash$ echo '(ctrl-v)(ctrl-[)]2;foobar(ctrl-v)(ctrl-g)'


bash$ printf '\033]2;foobar\07'


Explanation:
    ctrl-X == code of X - 64
So:
    <ESC> == ctrl-[ == octal 33
             ctrl-G == octal  7

A useful list of ascii codes:
    http://www.loria.fr/services/tex/fontes/ascii.dvi
or
    http://www.loria.fr/services/tex/fontes/ascii.ps

-- 
Victor Ott                              vott at gmx dot net

S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]