Urda Urda - 11 months ago 60
Bash Question

Pass ALL Arguments from Bash Script to Another Command

What is the simplest way to grab all the given arguments for a bash script and pass them all into another command within the script? For example:

Command Line:

./runProgram.sh [ARGS HERE]


#! /bin/bash
cd bin/
java com.myserver.Program [ARGS HERE]


For bash and other Bourne-like shells:

java com.myserver.Program "$@"