Cygwin BASH function to open the latest version of a document

Published: | by Julian Knight Reading time ~1 min.
📖 Posts | 📎 Development, Windows | 🔖 BASH, Batch, Cygwin, Scripting

One handy function I’ve added to .bashrc (so it is always available) under Cygwin (the LINUX command environment for Windows) works out the current working version of a document. It assumes that you keep copies that have a version number or date in the file name that will sort correctly.

You can use it with an alias like this:

If you name your documents sensibly such as “a-document-2009-07-20.doc” or “a-document-v01.01.doc”, then the latest version of the file will be opened in the default application

Technorati : BASH Diigo Tag Search : BASH


comments powered by Disqus