Skip to content

Instantly share code, notes, and snippets.

@parndt
Created March 22, 2011 23:18
Show Gist options
  • Save parndt/882306 to your computer and use it in GitHub Desktop.
Save parndt/882306 to your computer and use it in GitHub Desktop.
Useful unix functions
# Find files recursively in/under the current directory
function findin()
{
find . -exec grep $@ '{}' \; -print
}
# Rails 2 and Rails 3 console
function rc {
if [ -e "./script/console" ]; then
./script/console $@
else
rails console $@
fi
}
# Rails 2 and Rails 3 server
function rs {
if [ -e "./script/server" ]; then
./script/server $@
else
rails server $@
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment