On 07/21/2016 03:37 PM, bruce wrote:
> forgive me..
> 
> but i came across a perl article that was created for helping to solve
> this issue.. you're not the only one..
> 
> posting it here if you haven't seen it as it might shed light on the
> issue. been way too long for my perl fu to be of any use.
> 
> http://techblog.babyl.ca/entry/knotes-migration
> 
> |use 5.20.0; use experimental 'postderef'; use warnings; use Data::ICal;
> use Path::Tiny; use Email::Simple; path( $ENV{HOME},
> '.local/share/notes/new' ) ->child( $_->property('uid')->[0]->value )
> ->spew( Email::Simple->create( header => [ From => 'old kde ', Subject
> => $_->property('summary')->[0]->value, ], body =>
> $_->property('description')->[0]->value )->as_string ) for
> Data::ICal->new( # Data::ICal doesn't like the PRIORITY property data =>
> path( $ENV{HOME}, '.kde/share/apps/knotes/notes.ics') ->slurp =~
> s/^PRIORITY:\d+\r\n//mr )->entries->@*;|
> 
> 
> 
> 
> On Thu, Jul 21, 2016 at 5:58 PM, Maurizio Marini <mau...@datalogica.com
> <mailto:mau...@datalogica.com>> wrote:
> 
>     Hello Rick
> 
>     > The standard end-of-line marker in Linux/Unix is a newline or "\n" and
>     > any Linux text editor would have no problem with it.
>     that are not newline chr(10)
>     that are chr(92) followed by chr(110)
> 
>     hexdump -C notes.ics
> 
>     0000a910  65 63 20 72 65 77 72 69  74 65 20 73 73 6c 20 61  |ec
>     rewrite ssl a|
>     0000a920  63 74 69 6f 6e 73 20 69  6e 63 6c 75 64 65 5c 6e  |ctions
>     include\n|
>     0000a930  5c 6e 5c 6e 5c 6e 5c 6e  20 20 20 5c 6e 20 20 20 
>     |\n\n\n\n   \n   |
>     0000a940  5c 6e 20 20 20 5c 6e 20  20 20 5c 6e 20 20 20 5c  |\n 
>      \n   \n   \|
>     0000a950  6e 20 20 20 0d 0a 20 5c  6e 0d 0a 53 55 4d 4d 41  |n   ..
>     \n..SUMMA|
> 
>     as you can see, that are sequence of 5c 6e 5c 6e 5c 6e 5c 6e
>     but in last line you find
>     6e 20 20 20 0d 0a
> 
>     what I need is something like:
>     search 0x5c followed by 0x6e
>     replace them with 0x10

Oh! Literal backslashes and literal "ens"! What the devil?

Well, you could edit it with "vi" and use

        :g/\\n/s//(CTRL-V)(ENTER)/g
                  ^^^^^^^^^^^^^^^

For the underlined part, actually press "CTRL-V", and then the ENTER
key (it'll echo like "^M"). The "CTRL-V" means "interpret the next key
literally--don't act on it like a command".

That is a global find and replace that will look for the two character
sequence "backslash-en" and replace each occurance of it with a single
newline character. This text:

        each\nof\nthese\nshould\nbe\non\na\nseparate\nline\n

would look like:

        each
        of
        these
        should
        be
        on
        a
        separate
        line

using that command. I think that's what you want.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ri...@alldigital.com -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-  Time: Nature's way of keeping everything from happening at once.  -
----------------------------------------------------------------------
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://lists.fedoraproject.org/admin/lists/users@lists.fedoraproject.org
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to