From: Alex Elder Date: Wed, 3 Feb 2010 19:54:04 +0000 (+0000) Subject: xfstests: 219: fix awk filter for duplicate users X-Git-Tag: v1.1.0~194 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=caab36f192a3f3974c4fba6a9863060f74c7bb1e;p=xfstests-dev.git xfstests: 219: fix awk filter for duplicate users The filter I added for removing duplicate users from the output of repquota didn't do the job very well. This fixes that, making it so the first time a user is seen its line is printed, not thereafter. Signed-off-by: Alex Elder Reviewed-by: Christoph Hellwig --- diff --git a/219 b/219 index 6b42a1ec..e1841806 100755 --- a/219 +++ b/219 @@ -86,7 +86,7 @@ test_accounting() done repquota -$type -s -n $SCRATCH_MNT | grep -v "^#0" | filter_scratch | - awk '/^#/ { if (! seen[$1]) { seen[$1]++; next; } } { print }' + awk '/^#/ { if (seen[$1]) next; seen[$1]++; } } { print; }' } # real QA test starts here