Forums Register Login

Reading the arguments from .CSH file which is in next line at runtime thru java class

+Pie Number of slices to send: Send
I am calling java class in .csh script file with command line arguments like Java storagesrv start -c - and I am validating the command line arguments in java class and if hyphen "-" is there in the command line argument then I have to read the value from next line in the csh file.

The csh file looks like

java storeSrv start -c -
dbs/formtek@vault


Need to read the dbs/formtek@vault value at runtime in storeSrv java class.
Kindly give me some idea to read the arguments which is in next line....

+Pie Number of slices to send: Send
What you need is called a "here data" stream.

Do it like this:



This tells the shell to consider every line up to the declared terminator (EOF) to be part of the stdin to the application. You can usually also do shell variable substitution in the data stream, though it may depend on which shell you use.>
+Pie Number of slices to send: Send
Thank you very much, it is working dude.


O
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1529 times.
Similar Threads
Help to use command Line argument with ant
Get environment variables
Read arguments from .csh file which is in next line thru Java class
valid syntax
Passing Jave object arrays
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 02:29:45.