perl sort
This commit is contained in:
parent
6a0e9f3e64
commit
1a4b8674ea
@ -51,6 +51,9 @@ Urchin uses sort to format its output. GNU sort (as of GNU coreutils version
|
||||
necessary for the output to look right. If your version of sort lacks this
|
||||
feature, Urchin will try to use one of the following tools for sorting.
|
||||
|
||||
* perl
|
||||
* python
|
||||
|
||||
If no acceptable sorting program is available, Urchin will print a warning
|
||||
and use the incomplete sort that is installed on your system. This is not a
|
||||
big deal; if your test files all start with alphanumeric letters, the output
|
||||
|
8
urchin
8
urchin
@ -87,6 +87,10 @@ for line in sorted(sys.stdin.readlines()):
|
||||
'
|
||||
}
|
||||
|
||||
sort_perl() {
|
||||
perl -e 'print sort (<>);'
|
||||
}
|
||||
|
||||
# All temporary files go here
|
||||
urchin_tmp=$(mktemp -d)
|
||||
> "${urchin_tmp}/log"
|
||||
@ -603,7 +607,9 @@ main() {
|
||||
if test "${sort_result}" = edacb; then
|
||||
sort=sort
|
||||
else
|
||||
if which python > /dev/null; then
|
||||
if which perl > /dev/null; then
|
||||
sort=sort_perl
|
||||
elif which python > /dev/null; then
|
||||
sort=sort_python
|
||||
else
|
||||
echo 'Your version of sort sorts in dictionary order (-d) by default.
|
||||
|
Loading…
Reference in New Issue
Block a user