I have a bash script (named opsin) which only manages the calling of Java binary. All arguments are forwarded with ${@:1} to Java binary.
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
java -jar $DIR/../bin-java/opsin/opsin.jar ${@:1}
This binary, opsin.jar, also accepts stdin so you can do
echo "abcd" | java -jar opsin.jar
But I can do the same with bash script above:
echo "abcd" | opsin
How is the stdin passed to
java -jar $DIR/../bin-java/opsin/opsin.jar ${@:1}
in bash script?