Create A Daily Notes File Using A Ruby Shell Script
Join the DZone community and get the full member experience.Join For Free
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.
Shell script shell
Opinions expressed by DZone contributors are their own.