Changeset 172 for nutchez-0.2/src/test/duplicate_del
- Timestamp:
- Jun 9, 2010, 5:10:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/duplicate_del
r165 r172 11 11 # Delete duplicating ip addresss in file 12 12 IPs=$(cat $1 | grep -v 'ip6' | grep -v '#' | grep -v '^$' | awk '{print $1}') 13 cp -f $1 ${1}.bak 13 14 # 刪掉空白行 15 sed -i '/^$/d' $1 16 17 cp -f "$1" "${1}.old" 18 #read -p "cp - f $1 ${1}.old ; $?" 14 19 15 20 for ip_add in $(echo $IPs) … … 25 30 done 26 31 27 28 32 # Dlete duplicating hostname in file 29 33 hostnames=$(cat $1 | grep -v ip6 | grep -v '#' | grep -v '^$' |awk '{print $2}') … … 40 44 done 41 45 done 46 47 cp -f "$1" "${1}.bak" 48 #read -p "cp -f $1 ${1}.bak ; $?"
Note: See TracChangeset
for help on using the changeset viewer.