Posts tagged bash
Technically, this is a
bash cheat sheet; however, many of the commands will work with Bourne shell descendants, such as
When you press
ctrl+r in the shell, you activate a feature called "reverse-i-search." Reverse-i-search'ing lets you search through your shell history commands, from most recent to oldest.
I wanted to export my Safari Reading List on OS X, so I wrote some code to do it. I leveraged Ruby, but this methodology could be easily ported to other languages like Bash, Python, or Objective C.
In the ruby file:
#!/usr/bin/env ruby puts 'Hello world'
At the command line:
chmod +x ruby.rb
Then you can execute it like this: