[HPADM] SUMMARY vi question

From: Hustert Klaus-CKH035 (Klaus.Hustert@motorola.com)
Date: 04/24/03

  • Next message: Rama, Subu: "[HPADM] Summary: HP printing ... please help save a tree ..."
    From: Hustert Klaus-CKH035 <Klaus.Hustert@motorola.com>
    To: "HPADM (hpux-admin@dutchworks.nl)" <hpux-admin@DutchWorks.nl>
    Date: Thu, 24 Apr 2003 15:51:43 +0200
    
    

    Hi again,
    Thanks a lot who has responed:

    For the actual script I will use the ^v^L (ctrl v and ctrl L) solution.
    In future I will using sed or ed to get more speed.

    Here the suggestions:
    ################################################################################################
    Note that ^M is your guide, ^ (that is ^ and a space) is an ascii-readable view to value 0. ^A is for 1, ^B is for 2, ^L is for 12 and so on.

    If you know the <ctrl>v followed by a non-readable ascii code, you most likely once accidently hit <ctrl>vv and view at the prompt, it shows ^V !!

    THere you have it, to get ^L, just type <ctrl>v<ctrl>l. (and so you can also get ^M with <ctrl>v<ctrl>m)....
    The origin is the other way round: ^V is shorthand for <ctrl>v.

    Thanks to Corné, Harm and Cooper (excuse me when I am using the last name, I dunno it better ;-))

    ################################################################################################
    If you've got Perl installed, you can do this from the command line:

    $ perl -pi -e 's/\014//g' myfile
    Thanks to Christopher
    ################################################################################################

    sed -e 's/Ctrl-V Cr//g' -e 's/Ctrl-V Ctrl-L//g' File > file.out
    Thanks to Jack, Brett, Stuart

    Original question:
    Hi folks,
    I have a data stream and have to replace the form feed (^L; ASCII 12) with another symbol. My script looks like:

    vi xxx <<EOF1
    :%s/^M//g # I know I have to press ctrl+v in insert mode
                # and than the carrage return key to get the ^M
    :%s/^L//g # ,but how can I get the ^L ???
    :wq!
    EOF1

    Thanks in advance for advice.

    Klaus

    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    --
                 ---> Please post QUESTIONS and SUMMARIES only!! <---
            To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
           Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
     
     Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
                http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)
    

  • Next message: Rama, Subu: "[HPADM] Summary: HP printing ... please help save a tree ..."

    Relevant Pages

    • Creating a tree menu for a Word doc
      ... I wonder if this is possible...but is there such a thing as a vb script to ... place a tree menu in the left hand side of a Word doc? ... I don`t find very practical the hyperlink modality of having to press ... CTRL and left clicking to navigate to another doc, ...
      (microsoft.public.word.vba.general)
    • Re: Simple Shell Script Problem ??
      ... :>> I know that file is saying that it's an executable script, ... :> The "bad interpreter" message is saying that the interpreter given ... : Ctrl and type m. ...
      (comp.unix.shell)
    • Re: Thank You Microsoft
      ... Ctrl + F2 will put the script in notepad for you but it will would have to be copied and pasted back into the source of an email in order to view the graphics and such:) ... Hugs, ...
      (microsoft.public.windows.inetexplorer.ie6_outlookexpress.stationery)
    • Re: use md5sum in script
      ... I would like to use md5sum in a script to compute the hash of ... a STRING! ...
      (comp.unix.shell)
    • Re: Using non-printable characters in passwords
      ... I should clarify my original question better: ... Are there any other keys besides, CTRL or ALT, ... Previous post: Subject: Using non-printable characters in passwords ... Previous post: Whilst searching Google, I came across a SecurityFocus article that said: ...
      (Security-Basics)