Switch from file contents to STDIN in piped command? (Linux Shell)

前端 未结 4 1465
南旧
南旧 2020-12-31 22:28

I have a program (that I did not write) which is not designed to read in commands from a file. Entering commands on STDIN is pretty tedious, so I\'d like to be able to autom

4条回答
  •  遥遥无期
    2020-12-31 23:09

    Same as Idelic answer with more simple syntax ;)

    cat your_file_with_commands - | sh your_script
    

提交回复
热议问题