|
|
|
|
|
by chenxiaolong
723 days ago
|
|
This should work with any arbitrary filename: latest=$(printf '%s\0' <glob> | sort -zrV | head -zn1)
or with long args: latest=$(printf '%s\0' <glob> | sort --zero-terminated --reverse --version-sort | head --zero-terminated --lines 1
|
|