Solved

shell script question

Posted on 2012-03-14
5
217 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 50 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.

732 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