Skip to content

Commit

Permalink
Fix bashisms and whitespace
Browse files Browse the repository at this point in the history
Make the script compatible with any POSIX shell

Obtained from FreeBSD ports
  • Loading branch information
AMDmi3 committed Jun 28, 2017
1 parent c3fed3e commit 48601bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dnsmap-bulk.sh
@@ -1,5 +1,5 @@
#!/bin/bash
if [[ $# -ne 1 && $# -ne 2 ]]
#!/bin/sh
if [ $# -ne 1 -a $# -ne 2 ]
then
echo "usage: `basename $0` <domains-file> [results-path]";
echo "e.g.:";
Expand All @@ -9,11 +9,11 @@ then
fi
for i in `cat $1`
do
if [[ $# -eq 1 ]]
then
if [ $# -eq 1 ]
then
dnsmap $i
elif [[ $# -eq 2 ]]
elif [ $# -eq 2 ]
then
dnsmap $i -r $2
fi
done
done

0 comments on commit 48601bb

Please sign in to comment.