public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: xfs@oss.sgi.com
Subject: xfstests: 219: fix awk filter for duplicate users
Date: Wed, 03 Feb 2010 13:54:04 -0600	[thread overview]
Message-ID: <1265226844.2848.27.camel@doink1> (raw)

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 <aelder@sgi.com>

---
 219 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/219
===================================================================
--- 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



_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2010-02-03 19:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 19:54 Alex Elder [this message]
2010-02-03 20:43 ` xfstests: 219: fix awk filter for duplicate users Eric Sandeen
2010-02-03 20:51 ` Christoph Hellwig
2010-02-03 22:35   ` Alex Elder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1265226844.2848.27.camel@doink1 \
    --to=aelder@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox