On Mon, Jun 28, 2010 at 12:44 PM, Mike Frysinger <vap...@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 ? >> + if [ `ls -l $DMESG_DIR | wc -l` -ge 1 ]; then > > if [ -n "$(ls "$DMESG_DIR")" ] ; then > -mike ------------------------------------------------------------------------------ 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 _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list