Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-23 Thread Junio C Hamano
Jonathan Nieder writes: > With the updated subject, > > Reviewed-by: Jonathan Nieder Thanks. Here is what I tentatively queued for today's pushout. -- >8 -- From: Ben Walton Date: Mon, 22 Dec 2014 15:25:44 -0800 Subject: [PATCH] t0090: tweak awk statement for Solaris /usr/xpg4/bin/awk The a

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Jonathan Nieder
Junio C Hamano wrote: > Junio C Hamano writes: >> From: Ben Walton >> >> The awk statements previously used in this test weren't compatible >> with the native versions of awk on Solaris: >> >> echo "dir" | /bin/awk -v c=0 '$1 {++c} END {print c}' >> awk: syntax error near line 1 >> a

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Junio C Hamano
Junio C Hamano writes: > From: Ben Walton > > The awk statements previously used in this test weren't compatible > with the native versions of awk on Solaris: > > echo "dir" | /bin/awk -v c=0 '$1 {++c} END {print c}' > awk: syntax error near line 1 > awk: bailing out near line 1 > >

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Junio C Hamano
Junio C Hamano writes: > From: Ben Walton > > The awk statements previously used in this test weren't compatible > with the native versions of awk on Solaris: > > echo "dir" | /bin/awk -v c=0 '$1 {++c} END {print c}' > awk: syntax error near line 1 > awk: bailing out near line 1 > >

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Junio C Hamano
From: Ben Walton The awk statements previously used in this test weren't compatible with the native versions of awk on Solaris: echo "dir" | /bin/awk -v c=0 '$1 {++c} END {print c}' awk: syntax error near line 1 awk: bailing out near line 1 echo "dir" | /usr/xpg4/bin/awk -v c=0

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Junio C Hamano
Jonathan Nieder writes: > Junio C Hamano wrote: >> Ben Walton writes: > >>> echo "dir" | /usr/xpg4/bin/awk -v c=0 '$1 {++c} END {print c}' >>> 0 >>> >>> And with GNU awk for comparison: >>> echo "dir" | /opt/csw/gnu/awk -v c=0 '$1 {++c} END {print c}' >>> 1 >>> >>> Instead of modifying the awk c

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Jonathan Nieder
Junio C Hamano wrote: > Ben Walton writes: >> echo "dir" | /usr/xpg4/bin/awk -v c=0 '$1 {++c} END {print c}' >> 0 >> >> And with GNU awk for comparison: >> echo "dir" | /opt/csw/gnu/awk -v c=0 '$1 {++c} END {print c}' >> 1 >> >> Instead of modifying the awk code to work, use wc -w instead as that

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Jonathan Nieder
Ben Walton wrote: > echo "dir" | /usr/xpg4/bin/awk -v c=0 '$1 {++c} END {print c}' > 0 Thanks. Weird. Does awk -v c=0 '$1 != "" {++c} END {print c}' work better? [...] > --- a/t/t0090-cache-tree.sh > +++ b/t/t0090-cache-tree.sh > @@ -22,7 +22,7 @@ generate_expected_cache_tree_rec ()

Re: [PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Junio C Hamano
Ben Walton writes: > The awk statements previously used in this test weren't compatible > with the native versions of awk on Solaris: > > echo "dir" | /bin/awk -v c=0 '$1 {++c} END {print c}' > awk: syntax error near line 1 > awk: bailing out near line 1 > > echo "dir" | /usr/xpg4/bin/awk -v c=0

[PATCH] Use wc instead of awk to count subtrees in t0090-cache-tree

2014-12-22 Thread Ben Walton
The awk statements previously used in this test weren't compatible with the native versions of awk on Solaris: echo "dir" | /bin/awk -v c=0 '$1 {++c} END {print c}' awk: syntax error near line 1 awk: bailing out near line 1 echo "dir" | /usr/xpg4/bin/awk -v c=0 '$1 {++c} END {print c}' 0 And wit