Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for defect 116472 #107

Merged
merged 5 commits into from
May 4, 2016
Merged

Fix for defect 116472 #107

merged 5 commits into from
May 4, 2016

Conversation

bsanaei
Copy link

@bsanaei bsanaei commented May 2, 2016

No description provided.

@jgarcows
Copy link

jgarcows commented May 3, 2016

It breaks when you have different number of digits. So going from 9 to 10 for example sorts it wrong. See my test below:

$ IMAGES_ARRAY_NOT_USED=( jgarcows_1 jgarcows_4 jgarcows_30 )
$ for el in "${IMAGES_ARRAY_NOT_USED[@]}"; do echo "$el";  done | sort
jgarcows_1
jgarcows_30
jgarcows_4

@jgarcows
Copy link

jgarcows commented May 3, 2016

It looks like you can use the following, which will sort numerically, on the second field, delimited by the colon.

sort -t":" -k2 -n

@bsanaei
Copy link
Author

bsanaei commented May 3, 2016

I provided the changes based on the comments

@jgarcows
Copy link

jgarcows commented May 3, 2016

+1

@bsanaei bsanaei merged commit 43985ca into master May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants