Pattern substitution

R

rschroe

Can anyone explain this command to me?


A file is passed to this command and the output piped to a file.


perl -pe 's/\e&k[0-9]S\e&l[0-9]H\eE//'


What it seems to do is cut everything between the first / and the
second /, but can't quite get the sense of what is being cut.


Thanks for your help


RCS
 
B

Brian Helterline

Jim said:
\e is the metasymbol for the escape character, so it looks like it is
removing escape sequences such as escape-&-k-0-S and escape-&-l-9-H. I
don't know what the sequences \e&k0S through \e&k9S or \e&l0H through
\e&l9H do, but \eE is the ANSI escape sequence for "Next Line". ANSI

They are PCL escape sequences used to control printer output.
Most likely the file was created by a "Print to File" command
within an application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top