shell script passing subset of arguments
Posted
by arav
on Stack Overflow
See other posts from Stack Overflow
or by arav
Published on 2010-03-26T00:59:06Z
Indexed on
2010/03/26
1:23 UTC
Read the original article
Hit count: 317
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 "$@"
© Stack Overflow or respective owner