Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »



About

Manipulating the input command line arguments

Code Snippets


# Arguments
if [ $# -lt 2 ]; then
  echo "Usage: rosrun PACKAGE EXECUTABLE [ARGS]"
  echo "  rosrun will locate PACKAGE, cd to it, and try to find"
  echo "  an executable named EXECUTABLE in the PACKAGE tree."
  echo "  If it finds it, it will run it with ARGS."
  exit 1
fi


Listing
echo $*

You can shift individual args out with shift.

Iterating Over
echo $*
shift
shift
echo $*
  • No labels