Over a million developers have joined DZone.

Create A Daily Notes File Using A Ruby Shell Script

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) % Time.now.strftime('%d%m%y')"`

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

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}