Journal Punk Walrus's Journal: Should I start a journal here?
If I use this site, I think I'll do all tech-related notes.
Here's a taste: I just took the RHCE 300 Rapid Track course, and while I didn't pass the exam, I learned a LOT of cool stuff. One of them was a script our teacher made where you can see who has ssh access on your dhcp leases:
#!/bin/sh
# Copyright 2003 Brad Smithfor i in $(perl -ne 'm/^lease\D+?(\d+\.\d+\.\d+\.\d+)/
;
if ($1 != "") { print "$1\n";}'/var/lib/dhcp/dhcpd.leases) ;
do echo "Who's on $i?";
if ping -c1 -W1 $i &>/dev/null;
then ssh $i w ;
else echo "Nobody there!";
fi;
done
Arg... this journal format doesn't lend to cut and pasting code very well...
Should I start a journal here? More Login
Should I start a journal here?
Slashdot Top Deals