Skip to content

Commit

Permalink
Random Scripts
Browse files Browse the repository at this point in the history
Scripts I have needed to create for one reason or another that are
simplistic, but may be useful to have again.
  • Loading branch information
fulmetalpackets committed Oct 16, 2014
0 parents commit edcce62
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arpScanList.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
if [ -z "$1" ]
then
echo "Invalid arguments. ./arpScanList.sh CIDR"
exit 1
fi
#bar=(`echo $1|tr '.' '\n'`)
bar=(`echo $1|cut -d'.' -f1-2`)
arp-scan $1 | cut -f1 -d$'\t' | grep "$bar"
22 changes: 22 additions & 0 deletions findReplace.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

if [ -z "$1" ]
then
echo "Invalid arguments. ./findReplace.sh findArg replaceArg path"
exit 1
fi

if [ -z "$2" ]
then
echo "Invalid arguments. ./findReplace.sh findArg replaceArg path"
exit 1
fi

if [ -z "$3" ]
then
echo "Invalid arguments. ./findReplace.sh findArg replaceArg path"
exit 1
fi

find $3 -type f -print0 | xargs -0 sed -i "s/$1/$2/g"
echo "Done."

0 comments on commit edcce62

Please sign in to comment.