Update hosts file
This commit is contained in:
+4
-4
@@ -4,11 +4,11 @@ set -euo pipefail
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P )"
|
||||
|
||||
HOSTS="$(awk '{ sub(/#.*/,""); if (/\S/) print }' $DIR/list.txt)"
|
||||
|
||||
HOSTS="$(awk '{ sub(/#.*/,""); if (NF) print }' $DIR/list.txt | sort | uniq)"
|
||||
HOSTS="$(awk '{ sub(/#.*/,""); if (NF) print }' $DIR/hostlists/*.txt | sort | uniq)"
|
||||
|
||||
for HOST in $HOSTS ; do
|
||||
echo "127.0.0.1 $HOST"
|
||||
if [[ "$HOST" != "localhost" ]]; then
|
||||
echo "127.0.0.1 $HOST"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user