Shell Script To Get Public IP


Shell Script to get public ip

# vim pubip.sh

#!/bin/bash

pubip=$( curl http://ip4.me 2>/dev/null | sed -e 's#<[^>]*>##g' | grep '^[0-9]' )
echo $pubip

To Run

# chmod +x pubip.sh
#./pubip.sh



Shell Script To Get Public IP Shell Script To Get Public IP Reviewed by vivek sathisan on 15:55 Rating: 5

No comments:

© Copyright to vivek sathisan. Powered by Blogger.