?
Solved

shell script question

Posted on 2012-03-14
5
Medium Priority
?
220 Views
Last Modified: 2012-04-10
I have a script was not sure what does it do:

"$JAVA_HOME/bin/java" \
  "$OSGI_INSTALL" "$OSGI_CFG" \
  $EXTRA_X_ARG \
  $CONSOLE_ENCODING \
  -Dcom.ibm.websphere.migration.serverRoot="$WAS_HOME" \
  -Dws.ext.dirs="$WAS_EXT_DIRS" \
  -Dwas.install.root=$WAS_HOME \
  -Duser.install.root=$USER_INSTALL_ROOT \
  $PERF_JVM_OPTIONS \
  $WAS_LOGGING \
  $EXTRA_D_ARG \
  -classpath "$WAS_CLASSPATH":"$WAS_HOME"/derby/lib/derby.jar com.ibm.wsspi.bootstrap.WSPreLauncher \
  -nosplash  -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.migration.WASPreUpgrade "$@"


the reason I am asking is that I want to run the command WASPreUpgrade with an argument. where do I add that argument?

thanks,
0
Comment
Question by:DESEI-SELB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:simon3270
ID: 37721500
The script already passes any arguments to the WASPreUpgrade program as "$@" at the end of the last line.

Just add the argument(s) to the command line.
0
 

Author Comment

by:DESEI-SELB
ID: 37721607
is "$@" only goes for  WASPreUpgrade or for the other two application too(WSLauncher, WSPreLauncher)? thanks.
0
 

Author Comment

by:DESEI-SELB
ID: 37721973
also, the WASPreUpgrade is not being run from the command line but from a different script. so can I just add the argument at the end aftger "$@"?

thanks,
0
 
LVL 19

Accepted Solution

by:
simon3270 earned 200 total points
ID: 37722637
If this script is being called from anaother one, you acn either add the argument to the calling script, or can add it here - the last bit of code would then read:

    com.ibm.ws.migration.WASPreUpgrade "$@" your_argument

I'm not sure what java does when you pass three classes to it - I weould expect it to pass the arguments only to the last one.
0
 

Author Closing Comment

by:DESEI-SELB
ID: 37828324
thanks.
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question