cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agoLinux Usersimagemessage-square133linkfedilinkarrow-up11.25Karrow-down121cross-posted to: programmerhumor@lemmy.ml
arrow-up11.23Karrow-down1imageLinux Userscm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square133linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareHammerheart@programming.devlinkfedilinkarrow-up1·3 hours agoYes, it was meant to be a self deprecating admission that I have used this unnecessarily verbose command.
minus-squaredisobey2623@lemmy.dbzer0.comlinkfedilinkarrow-up2·1 day agoYou saying I can just skip cat in that command and it works?
minus-squareulterno@programming.devlinkfedilinkEnglisharrow-up0·18 hours agoMy output was empty for that command. Guess why? Because history only gives the last few lines in my system.
minus-squaredisobey2623@lemmy.dbzer0.comlinkfedilinkarrow-up4·1 day agoHow did I not know this. Thank you!
minus-squareoozynozh@sh.itjust.workslinkfedilinkarrow-up2·19 hours agoit’s grep STRING FILE to be precise or awk '/STRING/′ FILE if you prefer that for some reason
Useless use of cat?
Yes, it was meant to be a self deprecating admission that I have used this unnecessarily verbose command.
You saying I can just skip cat in that command and it works?
history | grep 'cat'
My output was empty for that command.
Guess why?
Because
history
only gives the last few lines in my system.How did I not know this. Thank you!
it’s
grep STRING FILE
to be preciseor
awk '/STRING/′ FILE
if you prefer that for some reason