我不知道如何在不使用猫的情况下完成以下工作.我并不担心分叉过程或任何事情,它让我感到不安:
$ printf "<format specification string>" $(cat source-file.txt)
Run Code Online (Sandbox Code Playgroud)
有没有更好的办法?
是.您无需创建新流程即可完成相同的操作cat:
$ printf "<format specification string>" $(<source-file.txt)
Run Code Online (Sandbox Code Playgroud)