Añadir 'lookup.sh'
With the command _host_ we don't need two files to make the resolutions
This commit is contained in:
parent
46c57f4ac1
commit
3b640825b4
20
lookup.sh
Normal file
20
lookup.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "You must specify a filename to read from"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
if [ ! -f "$1" ]
|
||||||
|
then
|
||||||
|
echo "File $1 does not exist or is not a file"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
while read ip n
|
||||||
|
do
|
||||||
|
if [ -z "$2" ]
|
||||||
|
then
|
||||||
|
echo $(host "$ip")
|
||||||
|
else
|
||||||
|
echo $(host "$ip" "$2")
|
||||||
|
fi
|
||||||
|
done < $1
|
Loading…
Reference in New Issue
Block a user