I would like to use sed to pull out the version number from the command:
svnversion --version
Which gives output like:
svnversion, version 1.6.2 (r37639)
compiled May 10 2009, 12:41:21
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
And after processing with sed, I'd like just:
1.6.2
So far, I have this monstrosity (due to my ignorance):
svnversion --version | sed s/[\wa-zA-Z//\(\):,]*//g | sed 's/[ ]//' | sed 's/[ ]//' | sed 's/[ ][0-9 ./n/-]*//'
I'm sure there is a simple elegant solution that an expert can provide easily.
Thanks.
-William