Skip to content

Instantly share code, notes, and snippets.

@harmishhk
Created January 2, 2016 16:18
Show Gist options
  • Save harmishhk/b7fba658c035856f81a8 to your computer and use it in GitHub Desktop.
Save harmishhk/b7fba658c035856f81a8 to your computer and use it in GitHub Desktop.
ros scripts
export ROS_IP=`ifconfig eth0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}'`
if [ -z "$ROS_IP" ]; then
export ROS_IP=`ifconfig wlan0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}'`
fi
if [ -z "$ROS_IP" ]; then
export ROS_IP="127.0.0.1"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment