假设我有一个 bash shell 脚本Myscript.sh,它需要一个参数作为输入。
Myscript.sh
但我希望被调用的文本文件的内容text.txt作为该参数。
text.txt
我试过这个,但它不起作用:
cat text.txt | ./Myscript.sh
有没有办法做到这一点?
linux bash shell arguments pipe
arguments ×1
bash ×1
linux ×1
pipe ×1
shell ×1