Bash Gibberish - Type Less, Do More
I would still love to hear your feedback in the comments below. Enjoy!
Over my several years of experience with bash I found several really useful tips and tricks. This post will deal with some of the more obfuscated looking “variables” that Bash provides.
Comic courtesy of http://themagnificentwhatever.com/
$?: Check the status of the last command
!!: Repeat the last command entirely
I specifically love to use this with sudo because it looks like you’re yelling at your computer and it caves.
!$: Repeat the last parameter of the last command
While this seems more niche and less useful than the previous point, I actually use this the most. It’s useful when you want to run two command on the same file, which is very common.
Discuss this post at the comment section below.
$$: Get your process id
Follow me on Twitter, Facebook or Google+