Ignore:
Timestamp:
Jan 3, 2006, 4:09:12 PM (15 years ago)
Author:
bcornec
Message:

Patches from Sébastien Aperghis-Tramoni <maddingue@…>

replace several occurences of "cat .. | grep .."
or with similar commands that accept filenames as arguments.
+ some sort | uniq replaced by sort -u

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mondo/mondo/restore-scripts/mondo/compare-me

    r30 r273  
    104104    padded_bfnum=`printf "%07d" $bf_num`
    105105    slice_fname=`GiveSliceName $bf_num $slice_num`
    106     checksum=`cat $slice_fname | cut -f1`
    107 #    finalsize=`cat $slice_fname | cut -f2`
    108     i=`cat $slice_fname | cut -f3`
     106    checksum=`cut -f1 $slice_fname`
     107#    finalsize=`cut -f2 $slice_fname`
     108    i=`cut -f3 $slice_fname`
    109109    outputfile=/mnt/RESTORING/"$i"
    110110    echo -n "$i "
     
    164164        outcome=$?
    165165            retval=$(($retval+$outcome))
    166         cat /tmp/rsm.log | grep -v "ignored" > /tmp/rsm.2.log
     166        grep -v ignored /tmp/rsm.log > /tmp/rsm.2.log
    167167        if [ "$outcome" -ne "0" ] ; then
    168168        echo -e -n "                                                                            \r"
     
    261261fi
    262262
    263 cat /tmp/compare-me.log \
    264 | grep -v -x "Files [^:]*:-" \
     263grep -v -x "Files [^:]*:-" /tmp/compare-me.log \
    265264| sort | uniq > /tmp/suspect.files
    266265
Note: See TracChangeset for help on using the changeset viewer.