
如果您的shell是bash(以及其他东西),则其的快捷方式
$(cat afile)是
$(< afile),因此您应编写:
mycommand "$(< file.txt)"
或者,从stdin中读取命令,因此:
mycommand < file.txt
欢迎分享,转载请注明来源:内存溢出

如果您的shell是bash(以及其他东西),则其的快捷方式
$(cat afile)是
$(< afile),因此您应编写:
mycommand "$(< file.txt)"
或者,从stdin中读取命令,因此:
mycommand < file.txt
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)