Carly™@lemmy.world to linuxmemes@lemmy.worldEnglish · 2 years agoLook, I'm lazy, okay?lemmy.worldimagemessage-square53fedilinkarrow-up1960arrow-down114
arrow-up1946arrow-down1imageLook, I'm lazy, okay?lemmy.worldCarly™@lemmy.world to linuxmemes@lemmy.worldEnglish · 2 years agomessage-square53fedilink
minus-squareSkyler@kbin.sociallinkfedilinkarrow-up6·2 years agoThis is my approach, and for those who don’t know, you can use those line numbers that come back from history to rerun the command. Like if your output is something like this: $ history | grep tmp 501 ls /tmp 502 history | grep tmp You can run !501 and it will just re-run ls /tmp
minus-squarenotasandwich1948@sh.itjust.workslinkfedilinkEnglisharrow-up2·2 years agodidn’t know there was a comment for that, I just always used cat to read the bash history file
deleted by creator
This is my approach, and for those who don’t know, you can use those line numbers that come back from
historyto rerun the command. Like if your output is something like this:$ history | grep tmp 501 ls /tmp 502 history | grep tmpYou can run
!501and it will just re-runls /tmpWoah! I had no clue!
I got that as
hgrepdeleted by creator
didn’t know there was a comment for that, I just always used cat to read the bash history file
deleted by creator