public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: LTP List Members <ltp-list@lists.sf.net>
Subject: Re: [LTP] [PATCH] Remove files which does not have a dmesg entry
Date: Mon, 28 Jun 2010 15:52:17 -0400	[thread overview]
Message-ID: <201006281552.18057.vapier@gentoo.org> (raw)
In-Reply-To: <AANLkTinzjwlLcX6zJ30Fxu9UjondsMavX21qXKfov840@mail.gmail.com>


[-- Attachment #1.1: Type: Text/Plain, Size: 1007 bytes --]

On Monday, June 28, 2010 15:47:27 Garrett Cooper wrote:
> On Mon, Jun 28, 2010 at 12:44 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Monday, June 28, 2010 07:52:18 Subrata Modak wrote:
> >> +     if [ $ALT_DMESG_OUT -eq 1 ] ; then
> >> +             PWD=`pwd`
> >> +             cd $DMESG_DIR
> >> +             for dmesg_file in `ls`
> >> +             do
> >> +                     dmesg_file_size=`wc -c $dmesg_file | cut -d ' '
> >> -f1 | tr -d
> > 
> > '\n'`
> > 
> >> +                     if [ $dmesg_file_size -eq 0 ]; then
> >> +                             rm -rf $dmesg_file
> >> +                     fi
> >> +             done
> >> +             cd $PWD
> >> +     fi
> > 
> > ugh.  what's wrong with simply executing:
> >        find "$DMESG_DIR" -size 0 -exec rm {} +
> 
> Or find "$DMESG_DIR" -size 0 | xargs rm -f ?

no, because mine handles funky named files while yours does not.  both are 
POSIX and handle command line length issues correctly.
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 235 bytes --]

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-06-28 20:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 11:52 [LTP] [PATCH] Remove files which does not have a dmesg entry Subrata Modak
2010-06-28 19:44 ` Mike Frysinger
2010-06-28 19:47   ` Garrett Cooper
2010-06-28 19:52     ` Mike Frysinger [this message]
2010-06-28 19:53 ` Garrett Cooper
2010-06-28 19:54   ` Mike Frysinger

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=201006281552.18057.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=ltp-list@lists.sf.net \
    --cc=yanegomi@gmail.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