Last active
August 29, 2015 14:02
-
-
Save marc-hanheide/28e949b468c06465f340 to your computer and use it in GitHub Desktop.
to set the ROS_HOSTNAME from a ppp address in an /etc/hosts file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ROS_HOSTNAME=`grep \`ifconfig | grep -A1 ppp | grep inet | cut -f2 -d:| cut -f1 -d" "\` /etc/hosts | tr -s " " | cut -f2 -d " "` | |
echo "ROS_HOSTNAME set to $ROS_HOSTNAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment