On 12/20/2003 2:37 AM, [EMAIL PROTECTED] wrote:

Hi,

I want to search for the word "status" in a group of files in a
directory and replace it with "status\n^L" where ^L is a page break
chatacter, In vi I can type it in using cntrl+l.

I want to do this by

perl -p -i.old -e 's/^STATUS$/STATUS\n(page break character)/' *

How can I "write" the page break character (^L) on command line?


Isn't page break ascii 11, i.e. hex x0B?


Try (after a backup):

perl -p -i.old -e 's/^STATUS$/STATUS\n\x0B/' *


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to