I Need 1.6.34 Or 1.6.37 For Mac
Sed 's/ b (0-9 ) b/0 1/g' versions.txt sort sed 's/ b0 (0-9 )/ 1/g' To explain why this works, consider the first sed command by itself. With your input as versions.txt, the first sed command adds a leading zero onto single-digit version numbers, producing: 06.03.01.01 06.03.01.02 06.03.01.03 06.03.01.10 06.03.01.11 The above can be sorted normally.
After that, it is a matter of removing the added characters. In the full command, the last sed command removes the leading zeros to produce the final output: 6.3.1.1 6.3.1.2 6.3.1.3 6.3.1.10 6.3.1.11 The works as long as version numbers are 99 or less. If you have version numbers over 99 but less than 1000, the command gets only slightly more complicated: sed 's/ b (0-9 ) b/00 1/g; s/ b (0-90-9 ) b/0 1/g' versions.txt sort sed 's/ b0 + (0-9 )/ 1/g' As I don't have a Mac, the above were tested on Linux. UPDATE: In the comments, Jonathan Leffler says that even though word boundary ( b) is in Mac regex docs, Mac sed doesn't seem to recognize it. He suggests replacing the first sed with: sed 's/^0-9./0&/; s/.
(0-9 )$/.0 1/; s/. (0-9 )./.0 1./g; s/. (0-9 )./.0 1./g' So, the full command might be: sed 's/^0-9./0&/; s/. (0-9 )$/.0 1/; s/.
(0-9 )./.0 1./g; s/. (0-9 )./.0 1./g' versions.txt sort sed 's/^0//; s/.0/./g' This handles version numbers up to 99.
Since the code needs to work on Linux as well as on Mac, the test on Linux was valid. You seem to be using the b (word boundary) option to sed. Unfortunately, although b' is mentioned in man 7 reformat on Mac OS X 10.9.1, the sed does not seem to recognize it, with or without the -E option. 'Tis a nuisance! You'll probably have to use sed 's/^0-9./0&/; s/. (0-9 )$/.0 1/; s/. (0-9 )./.0 1./g; s/.
(0-9 )./.0 1./g' instead. The repeated substitution is necessary. – Jan 28 '14 at 2:00. You can use additional features of git tag to get a list of tags matching a pattern and sorted properly for version tag ordering (typically no leading zeros): $ git tag -sort v:refname v0.0.0 v0.0.1 v0.0.2 v0.0.3 v0.0.4 v0.0.5 v0.0.6 v0.0.7 v0.0.8 v0.0.9 v0.0.10 v0.0.11 v0.0.12 From: -sort= Sort in a specific order. Supported type is 'refname (lexicographic order), 'version:refname' or 'v:refname' (tag names are treated as versions). Prepend '-' to reverse sort order.
I Need 1.6.34 Or 1.6.37 For Mac Os X
When this option is not given, the sort order defaults to the value configured for the tag.sort variable if it exists, or lexicographic order otherwise. See git config(1).
I Need 1.6.34 Or 1.6.37 For Macbook Pro
If you’re an iPhone 3GS or iPod touch 4G user and have upgraded to, which was released recently to fix a critical SSL bug then the good news is that it is still possible to perform an untethered jailbreak on your iOS device using a combination of Redsn0w and p0sixspwn. In this article we show you how to jailbreak iOS 6.1.6 first using, and then converting it into an untethered jailbreak using Cydia package. Update (June 17): Please note a new version of p0sixspwn has been released which adds support for iOS 6.1.1, so you can use p0sixspwn directly to perform the untethered jailbreak on your device running iOS 6.1.6, instead of using this workaround. You can check out our. If you’ve any problem with that method then you can use this workaround.