I want take input from a file and shows the output to user using shell script java.
java programe < input.txt
I used the following command but it won't works. Any Suggetions ??
I want take input from a file and shows the output to user using shell script java.
java programe < input.txt
I used the following command but it won't works. Any Suggetions ??
Maybe a newbie question, if you use google then also you could have got the answer. Try creating a jar file of your java program and run it through a shell script by passing arguments from a file like,
get values from file using shell command amd grep,cut,awk etc.
val=`grep "expcted filter" file`
va2=`grep "expcted filter" file`
java -jar <your jar file> $val1 $val2 > outputfile.txt
This will redirect output to a file which you can print through shell