简体   繁体   中英

how to store/return string value from a java main method?

I have a bash script that calls the java program .

java java.org.test -h "abc" The class computes the value of a specific string and this value is required by the bash script. and I should not be printing this value on the console.

How can this be done? Any suggestions here?

TEST_RESULT=$(java java.org.test -h "abc")java java.org.test -h "abc" > /dev/null

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM