ksh using input file with output going to same file name and location

I've been asked if I can write a "quick" little ksh script that will do the following:

java java_class_file /dir/input_file.xml /dir/output_file.xml

I'm a complete newbie with ksh so any help would be appreciated.

This is on AIX and java is found in

/usr/java5/jre/bin/java

Read our homework rules...

This is actually not a "homework" question
I've mostly done editing of existing scripts to create new ones for DB2. But in this case I have no examples to go by and was just looking for some guidance.

Thanks for your time

#!bin/ksh
# Java Java class path
#
#
#
# Usage : java java_class /input_xml_file /output_xml_file
#
#
input_file="/appdata/iwayapps1/iway4/bns/my/app_my_out/mx/sc/my_mx_sc_1317600.xml"
output_file=/appdata/iwayapps1/iway4/bns/my/app_my_out/mx/sc/my_mx_sc_1317601.xml"
java_home=/usr/java5/jre/bin/java
java_class=/apps/iwayapps1/iway4/bns/my/dm/app_my_scripts/FixSCFile

$java_home $java_class $input_file $output_file

The way you are doing it in your posted script is perfect, in case that was the question. :b:

Without seeing the source files for the class you're trying to run, it is hard to guess at why you would call an xml file an input file or an output file in the command line you're running at the end of the script. But the obvious problem with your script is that you either have an extra double quote (marked in red above) or you are missing a double quote just after the equals sign in that line. With the script shown, the definition for the output_file parameter starts with:

output_file=

and contains everything after the equals sign to the end of the file and should get a complaint from ksh for a mismatched quote.