alias_qr_rainmaker@lemmy.world to linuxmemes@lemmy.world · 4 days agoSeriously, why?lemmy.worldimagemessage-square103linkfedilinkarrow-up1465arrow-down115
arrow-up1450arrow-down1imageSeriously, why?lemmy.worldalias_qr_rainmaker@lemmy.world to linuxmemes@lemmy.world · 4 days agomessage-square103linkfedilink
minus-squarealias_qr_rainmaker@lemmy.worldOPlinkfedilinkarrow-up6arrow-down3·edit-24 days agodude holy shit that is AWESOME! i had something similar, but it was a custom function. srch() { cat ~/.bash_history | grep -Ein “$@”}
minus-squareKorthrunlinkfedilinkarrow-up3·edit-24 days agoDid you know that grep can take the name of the file(s) you want it to search as the final arguments? For example: grep -Ein "$@" ~/.bash_history
minus-squarealias_qr_rainmaker@lemmy.worldOPlinkfedilinkarrow-up3arrow-down2·4 days agoi always pipe into grep so sometimes i forget that’s even an option, lol
dude holy shit that is AWESOME! i had something similar, but it was a custom function.
srch() { cat ~/.bash_history | grep -Ein “$@”}
Did you know that grep can take the name of the file(s) you want it to search as the final arguments?
For example:
grep -Ein "$@" ~/.bash_historyi always pipe into grep so sometimes i forget that’s even an option, lol