Ignore:
Timestamp:
Jun 9, 2010, 5:10:28 PM (14 years ago)
Author:
rock
Message:

修改 Bug (Bug ID 1,2,3,4)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/test/duplicate_del

    r165 r172  
    1111# Delete duplicating ip addresss in file
    1212IPs=$(cat $1 | grep -v 'ip6' | grep -v '#' | grep -v '^$' | awk '{print $1}')
    13 cp -f $1 ${1}.bak
     13
     14# 刪掉空白行
     15sed -i '/^$/d' $1
     16
     17cp -f "$1" "${1}.old"
     18#read -p "cp - f $1 ${1}.old ; $?"
    1419
    1520for ip_add in $(echo $IPs)
     
    2530done
    2631 
    27 
    2832# Dlete duplicating hostname in file
    2933hostnames=$(cat $1 | grep -v ip6 | grep -v '#' | grep -v '^$' |awk '{print $2}')
     
    4044    done                                                                                                                                                             
    4145done
     46
     47cp -f "$1" "${1}.bak"
     48#read -p "cp -f $1 ${1}.bak ; $?"
Note: See TracChangeset for help on using the changeset viewer.