11-07-2001
simple shell - how to get a parameter typed in a shell script
Hi,
I am new to unix and using linux 7.2. I would like to create a script that would make it easyer for me to run my java programms. At the moment I have to type java [path to my program]myJavaprogram
I am trying to write a script that will allow me to type something like this "myscript myJavaprogram" or maybe "myscript -myJavaprogram.
This is what I got so far
#!/bin/sh
# Print the current working directory.
java `pwd`
#end of runjava file
How do I read an argument that I would like to pass?
ie %runjava Test
And the command passed to the shell would be "java [directory]Test"
Thenk you
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I was able to pass parameters to a shell script from the command line but now, I am trying to make the shell script to get those parameters/values from a file.
Please give me ideas how to do this or if you have an example or website that shows how to do this.
I tried searches but it... (2 Replies)
Discussion started by: bryan
2 Replies
2. UNIX for Dummies Questions & Answers
Can anyone help me how to write a shell script which accepts input parameter. My requirement is as follows:
I need to run a shell script with a input parameter, and inside the script i will create a file with this input parameter name.
Please help me out to create such a shell script.
... (1 Reply)
Discussion started by: jhmr7
1 Replies
3. Shell Programming and Scripting
Dear Friends,
Please help me.
How can I pass a parameter from one Shell-script to another Shell-script.
Example:
FirstScript.sh
-------------
./SecondScript.sh 'paramater'
And
SecondScript.sh
---------------
doing something with passed parameter from FirstScript.sh
Please... (2 Replies)
Discussion started by: subodhbansal
2 Replies
4. Shell Programming and Scripting
I have a script file as below named test1.sh
sed -e 's/xxxkeys/$1/g' template1.asp > template1.txt
sed -e 's/xxxkeys/$2/g' template2.asp > template2.txt
sed -e 's/xxxkeys/$3/g' template3.asp > template3.txt
sed -e 's/xxxkeys/$4/g' template4.asp > template4.txt
I want to replace $1 with a,... (1 Reply)
Discussion started by: satgur
1 Replies
5. Shell Programming and Scripting
Hi All
I have a shell script which calls all the Teradata Utiltyes . There is a sudden change in the requirment .
What i'm asked to do is
pass on the DATE to the shell script which should take the date automatically and run the utilityes.
i.e. the date should not be passed on... (5 Replies)
Discussion started by: vinayrao
5 Replies
6. AIX
I would like to run a compress script on files in certain directories.
My compress_script.sh is just basically
compress file*
In order for me to use this I have to copy it into each directory and run it.
How can I state the directory on the command line with the compress script so it... (2 Replies)
Discussion started by: NycUnxer
2 Replies
7. Shell Programming and Scripting
How can i chnage the parameter value in shell script.
file name is icare_mmi_cls.com, inside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com.
can you please provide me with examples.
Thanks
Double post - check your PMs and follow the rules, thanks. (0 Replies)
Discussion started by: damodarreddys
0 Replies
8. UNIX for Dummies Questions & Answers
How can i chnage the parameter value in shell script.
file name is icare_mmi_cls.com, iside that the parameter name is 10.100.1.2" replace the address to bep-sftp.cce.com.
can you please provide me with examples.
Thanks. (3 Replies)
Discussion started by: damodarreddys
3 Replies
9. Shell Programming and Scripting
Hi
I have two shell script, the second script takes as a parameter the output variable of the first script, please how to retrieve the variable from the first script to pass as a parameter to the second script?
Script1.sh
i=0
i=$(($i + 1))
Script2.sh
echo $1
Thank you (0 Replies)
Discussion started by: chercheur111
0 Replies
10. Shell Programming and Scripting
Hi All,
I need urgent Help from all of you here.
Below is my code-
==================================================
#!/usr/bin/sh
cd $1
cat $2 | tr -ds "$" "" > parameter_file.param
export `parameter_file.param`
chmod 777 parameter_file.param
echo $1
echo $2
cd $prmDirInput... (5 Replies)
Discussion started by: Amit786
5 Replies
LEARN ABOUT MOJAVE
schemagen
schemagen(1) General Commands Manual schemagen(1)
NAME
schemagen - Java(TM) Architecture for XML Binding Schema Generator Specification Version: 2.0
Reference Implementation (RI) Version: 2.0 ea3
Launching schemagen
The schema generator can be launched using the appropriate schemagen shell script in the bin directory for your platform.
The current schema generator can process either Java source files or class files.
We also provide an Ant task to run the schema generator - see the instructions for using schemagen with Ant.
For Solaris/Linux
% path/to/jaxb/bin/schemagen.sh Foo.java Bar.java ...
Note: Writing schema1.xsd
For WindowsNT/2000/XP
> path ojaxbinschemagen.bat Foo.java Bar.java ...
Note: Writing schema1.xsd
If your java sources/classes reference other classes, they must be accessable on your system CLASSPATH environment variable, or they need
to be given to the tool by using the -classpath/-cp options. Otherwise you will see errors when generating your schema.
Command Line Options
Usage: schemagen [-options ...] <java files>
Options:
-d <path> : Specify where to place processor and javac generated class files
-cp <path> : Specify where to find user specified files
-classpath <path> : Specify where to find user specified files
-help : Display this usage message
Generated Resource Files
The current schema generator simply creates a schema file for each namespace referenced in your Java classes. There is no way to control
the name of the generated schema files at this time. For that purpose, use the schema generator ant task.
See Also
o JAXB 2.0:
* Release Notes @
http://java.sun.com/webservices/docs/2.0/jaxb/ReleaseNotes.html
* XJC @
http://java.sun.com/webservices/docs/2.0/jaxb/xjc.html
* XJCTask @
http://java.sun.com/webservices/docs/2.0/jaxb/xjcTask.html
* SchemaGen @
http://java.sun.com/webservices/docs/2.0/jaxb/schemagen.html
* schemagenTask @
http://java.sun.com/webservices/docs/2.0/jaxb/schemagenTask.html
* Sample Apps @
http://java.sun.com/webservices/docs/2.0/jaxb/samples.html
* Changelog @
http://java.sun.com/webservices/docs/2.0/jaxb/changelog2.html
o JAXB 1.0.x:
* Release Notes @
http://java.sun.com/webservices/docs/2.0/jaxb/jaxb-1_0.html
* Changelog @
http://java.sun.com/webservices/docs/2.0/jaxb/changelog.html
o JAXB RI Extensions:
* Runtime Properties @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorProperties.html
* XJC Customizations @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorCustomizations.html
* Develop Plugins @
http://java.sun.com/webservices/docs/2.0/jaxb/developPlugins.html
o JAXB RI Schema Languages:
* W3C XML Schema @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#xschema
* RELAX NG @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#relaxng
* DTD @
http://java.sun.com/webservices/docs/2.0/jaxb/vendorSchemaLangs.html#dtd
o JAXB Community:
* Java.net Homepage @
http://jaxb.dev.java.net
* Developer interest list @
https://jaxb.dev.java.net/servlets/ProjectMailingListList
* FAQ @
https://jaxb.dev.java.net/faq/index.html
07 Aug 2006 schemagen(1)