Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- sbin/ifconfig |grep -B1 "inet addr" |awk '{ if ( $1 == "inet" ) { print $2 } else if ( $2 == "Link" ) { printf "%s:" ,$1 } }' |awk -F: '{ print $1 ": " $3 }' > message.txt 2> message.txt
- /home/pi/TheProject/Scripts/sendEmail/sendEmail -f "[from-address]" -t "[to-address]" -u "#IPINFO" "$ip_info" -s smtp.gmail.com:587 -o message-file=message.txt tls=yes -xu "[email-username]" -xp "[email-password]"
- rm message.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement