Issues with special character '<' in Bash string?
问题 I am making a shell script that takes an optional standard input. I have a snippet of the code below. ${file} is just a fileName that is written in a txt file containing a list of all file names. $2 in this case would be another program (a shell script too). if [ -f ${file}.in ]; then #if ${file}.in exists in current directory stdIn="< ${file}.in" #set optional stdIn fi if ! [ -f ${file}.args ]; then #if ${file}.args does not exist in curr directory $2 $stdIn > ${file}.out #run the $2 program