[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sort parameters question: -V and -f
From: |
Assaf Gordon |
Subject: |
sort parameters question: -V and -f |
Date: |
Wed, 06 Apr 2011 17:26:05 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100918 Icedove/3.1.4 |
Hello,
I'm wondering if this is a bug (where "-f" is ignored when using version sort):
=========
$ sort --debug -f -k2,2V
sort: using simple byte comparison
sort: leading blanks are significant in key 1; consider also specifying `b'
sort: option `-f' is ignored
==========
My assumption is that using "-f" as stand alone parameter should have the same
effect as using it in a specific key (for that key). e.g. the following two
commands are equivalent:
sort -f -k1,1
sort -k1f,1
But the following two commands are not equivalent (because the standalone "-f"
is ignored):
sort -f -k1V,1
sort -k1Vf,1
Example:
=================
## This works
$ printf "a\nB\nc\n" | sort -k1f,1
a
B
c
$ printf "a\nB\nc\n" | sort -f -k1,1
a
B
c
## This doesn't work
$ printf "a13\nA5\na1\n" | sort -k1Vf,1
a1
A5
a13
$ printf "a13\nA5\na1\n" | sort -f -k1V,1
A5
a1
a13
===================
I'm using coreutils 8.10.
-gordon
- sort parameters question: -V and -f,
Assaf Gordon <=