DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Create A Daily Notes File Using A Ruby Shell Script

  • submit to reddit
        The following snippet launches a new gedit file with todays date when executed from a bash script.

gedit `ruby -e "puts %q(m/notes%s.txt) %'%d%m%y')"`

observed: gedit starts with a new file called notes050210.txt in the ~/m directory.