<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Recent posts to Discussion</title><link>http://sourceforge.net/p/gnuwin32/discussion/</link><description>Recent posts to Discussion</description><language>en</language><lastBuildDate>Mon, 10 Dec 2012 00:42:36 -0000</lastBuildDate><item><title>Using () \1 and &amp; in GNUwin sed</title><link>http://sourceforge.net/p/gnuwin32/discussion/74807/thread/6e1e12fa/</link><description>Brilliant - this worked perfectly. Thank you. I was on the right track but had got confused about what has to be quoted and what has to be escaped.

Thanks - Rowan </description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rowan</dc:creator><pubDate>Mon, 10 Dec 2012 00:42:36 -0000</pubDate><guid>http://sourceforge.netce560d2aa5e6d380e99a49cab074e27edd86fc0d</guid></item><item><title>Using () \1 and &amp; in GNUwin sed</title><link>http://sourceforge.net/p/gnuwin32/discussion/74807/thread/6e1e12fa/</link><description>Sed is fiddly but fortunately i've fiddled with it quite a bit in the past and made notes last time and remember enough!

I did some fiddling after reading your question and I think i've got it. 

Look at these examples

C:\&gt;echo 123123123 | sed "s/.{3}/\0\x0a\x0d/g"
123123123
DID NOT WORK.  THE .{3} IS NOT RECOGNIZED UNLESS YOU DO -r 


a few examples practicing with \0 without the "complexity" of .{3}

C:\&gt;echo 123123123 | sed "s/2/\x0a\x0d/g"
1
31
31
3
THIS WORKED AS EXPECTED. i.e. new lines work fine.

C:\&gt;echo 123123123 | sed "s/2/\0\x0a\x0d/g"
12
312
312
3
ADDED \0, THIS WORKED AS EXPECTED  (we see later that you can use &amp; in place of it, though quotes become very necessary when doing that because otherwise cmd interprets it. But i'm using \0 for now).

C:\&gt;echo 123123123 | sed "s/.../\0\x0a\x0d/g"
123
123
123
THIS WORKS AS EXPECTED NOW V CLOSE TO WHAT YOU WANT

C:\&gt;echo 123123123 | sed -r "s/.{3}/\0\x0a\x0d/g"
123
123
123
THIS WORKS AS EXPECTED LOOKS VERY NICE

So I suppose you'd replace  .{3} with .{394}

Looks like Sed does recognize &amp;. But you have to use quotes.  (i've been using quotes anyway because I suppose it's good practice)

C:\&gt;echo 123123123 | sed -r "s/.{3}/\0\x0a\x0d/g"
123
123
123


C:\&gt;echo 123123123 | sed -r "s/.{3}/&amp;\x0a\x0d/g"
123
123
123


C:\&gt;


C:\&gt;echo abc | sed "s/b/&amp;t/g"
abtc

C:\&gt;echo abc | sed "s/b/\0t/g"
abtc

C:\&gt;


Be warned, Sed is fine for what you want to do(I suppose.. unless you find it slow). But  on a related note, it can't find new lines so if you put new lines in the find sections,  it won't find them.  Yours are in the replace section and sed is fine with that.

I don't know perl properly but once you know the general framework you can fiddle and use perl, and perl has less limitations as it can find new lines or any character. Here are some examples
http://superuser.com/questions/416419/perl-for-matching-with-regex-in-terminal



And by the way, if you wanted to use  () to capture things, 
Then i'd suggest using -r  
See

C:\&gt;echo abc | sed "s/(b)/\1\1\1/g"
sed: -e expression #1, char 14: invalid reference \1 on `s' command's RHS

C:\&gt;echo abc | sed -r "s/(b)/\1\1\1/g"
abbbc

C:\&gt;echo abc | sed "s/\(b\)/\1\1\1/g"
abbbc
That is how you do capturing brackets without -r, i.e. it's not pretty. \(b\)
C:\&gt;


</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">varip dan</dc:creator><pubDate>Sun, 09 Dec 2012 20:17:23 -0000</pubDate><guid>http://sourceforge.netd11fa7f67758c69115b1f24808f8f50abdace9e4</guid></item><item><title>less broken in Win7 64-bit</title><link>http://sourceforge.net/p/gnuwin32/discussion/131144/thread/ad7a4948/</link><description>With the "-X" option i'm getting some output, but it still doesn't work properly.
cygwin less shows this
WARNING: terminal is not fully functional

</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">eadmaster</dc:creator><pubDate>Wed, 05 Dec 2012 14:26:27 -0000</pubDate><guid>http://sourceforge.netd08dbf23ea17b70d225d99baf75b85ea98ab42eb</guid></item><item><title>less broken in Win7 64-bit</title><link>http://sourceforge.net/p/gnuwin32/discussion/131144/thread/ad7a4948/</link><description>(1) Does this also happen if you do a 

  SET LESS=-X

in the shell?

(2) If you install the cygwin basis package, and use the 'less' from there, does the error also occur?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ronald</dc:creator><pubDate>Wed, 05 Dec 2012 14:05:43 -0000</pubDate><guid>http://sourceforge.net5e918d9213713f370180b436191bcb0d92ba7e2f</guid></item><item><title>WGET for Windows - https connection</title><link>http://sourceforge.net/p/gnuwin32/discussion/general/thread/065c51d7/</link><description>I forgot to mention I'm using a Windows Server 2003 box.

I found the following while googling:
...
SSL certificates
 
Current versions of OpenSSL do not come with root certificates. This means when trying to download over SSL, wget will give you errors such as
   Unable to locally verify the issuer's authority.
ERROR: certificate common name `dnsname' doesn't match requested host name 
`dnsname'.
 
Either you can use the suggested --no-check-certificate to skip authentication - only use this if you only need encryption functionality, and not authentication. The alternative is to get a set of root certificates and pass it to wget with --ca-certificate file.crt. The problem is then to get a correct root certificate bundle first. The following link has a perl script which will download root certificates from Mozilla and convert them to a wget usable certificate bundle (you'll need Perl, typically
 
ActivePerl). 

http://www.floodgap.com/software/ttytter/mk-ca-bundle.txt 

Do not trust other people to give you a set of root certificates. This means you should not trust this site (but it no longer offers certificates anyway). Audit any sources you download root certificates from, audit the tools you use to process certificates (including the mk-ca-bundle.pl script linked above).
 
The official source for root certificates is your Windows install media and Windows Update (remember to update the root certificates regularly), though this set is not used by wget and many other Windows tools.
 
Furthermore, the Windows makefiles for wget refer to the certificate bundles available at http://curl.haxx.se/docs/caextract.html (which are extracted from Mozilla as well).
 ...

I do not know how to use the script that downloads and converts the certs. I tried changing the shebang line to that of my Perl location and I tried running it from the command line and from the Internet. Nothing happens from the command line but I get a 500 internal server error from the Internet.

Anyone know how to get the the bundle cert?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jeffshead</dc:creator><pubDate>Tue, 31 Jul 2012 01:32:04 -0000</pubDate><guid>http://sourceforge.net77d721e0fb9c59115784287001306cb9f50c805f</guid></item></channel></rss>