SHΛRK@lemmy.zip to Programmer Humor@programming.dev · 3 days agoLinux Catlemmy.zipexternal-linkmessage-square61linkfedilinkarrow-up1389arrow-down18file-text
arrow-up1381arrow-down1external-linkLinux Catlemmy.zipSHΛRK@lemmy.zip to Programmer Humor@programming.dev · 3 days agomessage-square61linkfedilinkfile-text
minus-squaredan@upvote.aulinkfedilinkarrow-up12·3 days agoAdmittedly I still use cat for this. This also works too, but it’s more verbose: echo "$(<foo.txt)" It’s mentioned in the Bash man pages: The command substitution $(cat file) can be replaced by the equivalent but faster $(< file).
minus-squarenot_IO@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up5·3 days agohow in the world is this not a useless use of echo and equivalent to <foo.txt
minus-squaredan@upvote.aulinkfedilinkarrow-up3·3 days agoOK, TIL you can just do <foo.txt. I didn’t think that worked. Thanks!
Admittedly I still use
catfor this.This also works too, but it’s more verbose:
echo "$(<foo.txt)"It’s mentioned in the Bash man pages:
how in the world is this not a useless use of echo and equivalent to
<foo.txtOK, TIL you can just do
<foo.txt. I didn’t think that worked. Thanks!