I can't figure out how to make the following work without using cat. I'm not worried about the forked process or anything, it just unsettles me:
$ printf "<format specification string>" $(cat source-file.txt)
Is there a better way?
Yes. You can accomplish the same thing, without creating a new process for cat, with:
$ printf "<format specification string>" $(<source-file.txt)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With