fix to not try to choke down entire log file to find the unassigned dhcp addresses.
authorChris Koeritz <fred@gruntose.com>
Wed, 9 Apr 2014 03:38:26 +0000 (23:38 -0400)
committerChris Koeritz <fred@gruntose.com>
Wed, 9 Apr 2014 03:38:26 +0000 (23:38 -0400)
scripts/system/find_dhcp_unassigned.sh

index 0983bf207802a43b4354dafe85d6cd88df028ade..6abc1c71cbe2f49d3c0fa667ab5843acd9f93e1b 100644 (file)
@@ -8,5 +8,5 @@ if [ ! -s "$logfile" ]; then
   # a simple fail over that's not guaranteed to work.
   logfile="/var/log/syslog"
 fi
-grep -i "dhcp.*2[4-5][0-9]" "$logfile" | less
+tail -n 500 "$logfile" | grep -i "dhcp.*2[4-5][0-9]" | less