melanie ревизій цього gist . До ревизії
1 file changed, 19 insertions
bulk-nslookup.sh(файл створено)
@@ -0,0 +1,19 @@ | |||
1 | + | #!/bin/bash | |
2 | + | ||
3 | + | if [ $# -ne 1 ]; then | |
4 | + | echo "Usage: $0 <file>" | |
5 | + | exit 1 | |
6 | + | fi | |
7 | + | ||
8 | + | input_file="$1" | |
9 | + | ||
10 | + | if [ ! -f "$input_file" ]; then | |
11 | + | echo "File not found: $input_file" | |
12 | + | exit 1 | |
13 | + | fi | |
14 | + | ||
15 | + | while IFS= read -r ip_address; do | |
16 | + | echo "Performing nslookup for $ip_address" | |
17 | + | nslookup "$ip_address" | |
18 | + | echo "-----" | |
19 | + | done < "$input_file" |
Новіше
Пізніше