Avatar of liyy
 asked on

java command line scripting


Java expert please help.

I have a java command running Mac OS X Server platform and I don't want a staff run command line as they just a user

the command line program requires 3 variables, file1.doc file2.doc and outputfile.doc, sample like below:

java -jar xxxx.jar compare "file1.doc"  "file2.doc"  "outputfile.doc"

How can I enable file1.doc and file2.doc variable so that user can type a script like:

program-script file1 file2 and automatically produce outputfile.doc.

file1 and file2 means that the filename are variable name.
JavaShell Scripting

Avatar of undefined
Last Comment

8/22/2022 - Mon

How about this?
java -jar xxxx.jar compare "${1}"  "${2}"  "outputfile.doc"

Open in new window


thanks CEHJ,

Is it possible generate outfile like "${1}+result.doc" ?

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes