Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice. Indeed quite similar. Great minds think alike hehe.

All of your examples include a "!", which is a special character in bash. Sure that works without quoting?



to save you the trouble of finding out for your self: yes, it works (! is not that special)


I eventually have to figure out what ! does. In my she'll it always leads to errors about some events and whatnot. I shall Google and find out ;-)


Oh wow ! is quite powerful. Some of these bang commands are quite questionable, but hey... Like !12 runs the 12th command from the bash history. That's seems super dangerous to me.


Here's a good collection of tricks like that:

https://github.com/jlevy/the-art-of-command-line




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: