Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Nano calls it ^L, but of course, typing something like

$ grep -v "^\^L" file

doesn't work. Its unicode codepoint is 000C. How can I match it in a regular expression?

share|improve this question
up vote 9 down vote accepted

That seems to be the good old form feed character, described in man ascii as:

Oct   Dec   Hex   Char
014   12    0C    FF  '\f' (form feed)

(Not mentioned there, but ^L's code is the same 12.)

Then in bash any of these should work:

grep -v $'^\f' file

grep -v $'^\cL' file

grep -v $'\x0C' file
share|improve this answer
That explains why ^L works to clean up the the screen. For example, when you're on console, editing a file, and syslog is spamming the console. Thanks. – Tim Kennedy Nov 26 '11 at 19:39
in case anyone else is reading this to find out, kwrite regular expressions accept \f to represent this character – ixtmixilix Feb 17 '12 at 12:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.