You can clone with
# speak the IP address of this machine, e.g. for a Raspberry Pi with no screen.
# requires "espeak" (sudo apt-get install espeak)
# Andy Stanford-Clark (@andysc)
# give it a chance to get an IP address at boot-up
# look at wireless first, and say that, even if there's also ethernet
$IP = `ifconfig wlan0 | grep 'inet addr'`;
$text = "wireless";
# if no wireless, look for ethernet
$IP = `ifconfig eth0 | grep 'inet addr'`;
$text = "ethernet";
if ($IP =~ /inet addr:(.*?) /)
# insert spaces between all characters
@characters = split(//,$1);
$text .= " address " . join(" ",@characters);
# change dots to, um, dots
$text =~ s/\./dot/g;
$text = "no IP address";
# wait a minute before doing it again
Speak the IP address of your linux machine.
Perfect for Raspberry PIs or other headless servers. Just plug in a speaker or earphones and wait to be told the IP address to ssh to!
Requires "espeak" - sudo apt-get install espeak
Make IPspeak.pl executable:
chmod +x IPspeak.pl
Run it automatically at startup (otherwise it's rather pointless, as you'd have to know the IP address to log-in to start it ;) )...
Add to /etc/rc.local (e.g. sudo vi /etc/rc.local ) above the "exit 0", the line:
su - pi -c /home/pi/IPspeak.pl
(note the spaces)
If you want to stop IPspeak (once you've logged in to the IP address it's told you), type: