bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26879: end-of-line issue with cygwin 4.4-1 sed 4.4


From: Assaf Gordon
Subject: bug#26879: end-of-line issue with cygwin 4.4-1 sed 4.4
Date: Fri, 12 May 2017 22:33:44 -0400

> On May 12, 2017, at 22:17, Assaf Gordon <address@hidden> wrote:
> 
>  $ touch "a'b" 'c$d' 'e f' "$(printf 'g\nh')"
>  $ find -type f -print0 \
>         | tr -d '\r' \
>         | sed -z -e "s/'/'\"'\"'/g" -e "s/^/'/" -e "s/\$/'/" \
>         | tr '\0' '\n'                                                        
>                          
>  './e f'
>  './a'"'"'b'
>  './g
>  h'
>  './c$d'

Correcting myself:
there is no need for the "tr -d '\r'" in the above example:
since "find" uses "-print0" - it will NOT print LF or CRLF as line-endings,
and so there's nothing to remove.

-assaf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]