svn commit: r293777 - user/cperciva/freebsd-update-build/scripts

Gleb Smirnoff glebius at FreeBSD.org
Tue Jan 12 22:55:32 UTC 2016


On Tue, Jan 12, 2016 at 02:42:48PM -0800, Bryan Drewery wrote:
B> On 1/12/16 2:42 PM, Bryan Drewery wrote:
B> > On 1/12/16 2:36 PM, Gleb Smirnoff wrote:
B> >> On Tue, Jan 12, 2016 at 10:19:30AM -0800, Devin Teske wrote:
B> >> D> On Tue, 2016-01-12 at 10:08 -0800, Gleb Smirnoff wrote:
B> >> D> > On Tue, Jan 12, 2016 at 06:06:07PM +0000, Gleb Smirnoff wrote:
B> >> D> > T> Author: glebius
B> >> D> > T> Date: Tue Jan 12 18:06:07 2016
B> >> D> > T> New Revision: 293777
B> >> D> > T> URL: https://svnweb.freebsd.org/changeset/base/293777
B> >> D> > T> 
B> >> D> > T> Log:
B> >> D> > T>   Adjust script removing .orig files and empty files:
B> >> D> > T>   - Adopt the regexp to cleaned patches, that don't have
B> >> D> > T>     diff or subversion header.
B> >> D> > T>   - Switch from awk to sed, due to bugs in awk regexps.
B> >> D> > 
B> >> D> > If anyone interested, in our awk regexp "^diff" would match
B> >> D> > "    diff", any amount of whitespace. Since ntp has a lot
B> >> D> > variables named diff, running the script over ntp patches
B> >> D> > produce a lot of garbage.
B> >> D> > 
B> >> D> 
B> >> D> Gleb, I can't seem to reproduce what you're saying.
B> >> D> 
B> >> D> $ echo "   diff" | awk '/^diff/'
B> >> D> $ echo "   diff" | awk '!/^diff/'
B> >> D>    diff
B> >>
B> >> echo "  diff" | awk '$1 ~ /^diff/ { print $NF }'
B> >>
B> > 
B> > That's not a bug. $1 is "diff".
B> > 
B> 
B> $0 is the whole line:
B> 
B> # echo "     blah"|awk '{print $1}'
B> blah
B> 
B> # echo "     blah"|awk '{print $0}'
B>      blah

Oh, my failure :(

-- 
Totus tuus, Glebius.


More information about the svn-src-user mailing list