Skip to main content
edited title
Link
Michael Aaron Safyan
  • 96k
  • 16
  • 140
  • 200

shell script passing subset of arguments

Fixed indentation
Source Link
harto
  • 90.6k
  • 9
  • 49
  • 62

From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position.

valArgs() {

valArgs() { until [ $# -eq 0 ]; do   case $1 in   -EMAIL)   MAILFLAG=Y   shift   break   ;;   esac  done } main() { valArgs "$@"   $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@" 

}

main()

{

valArgs "$@"

$JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position.

valArgs() {

until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done 

}

main()

{

valArgs "$@"

$JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"

From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position.

valArgs() { until [ $# -eq 0 ]; do   case $1 in   -EMAIL)   MAILFLAG=Y   shift   break   ;;   esac  done } main() { valArgs "$@"   $JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@" 
Source Link
Arav
  • 5.3k
  • 23
  • 88
  • 129

shell script passing arguments

From the wrapper shell scripts i am calling the Java program. I want the Unix shell script to pass all the arguments to java program except the EMAIL argument. HOW Can i remove the EMAIL argument and pass the rest of the arguments to the java program. EMAIL argument can come at any position.

valArgs() {

until [ $# -eq 0 ]; do case $1 in -EMAIL) MAILFLAG=Y shift break ;; esac done 

}

main()

{

valArgs "$@"

$JAVA_HOME/bin/java -d64 -jar WEB-INF/lib/test.jar "$@"