cause I think the -k is interpreted as specifying the input twice. ow would I change this so that its as equivalent as possible but runs on windows? Thanks
And what does the documentation say?
I'm on windows, I have two sort.exe files on my system, one came with perl, the other is gnu sort
They have different syntaxs
I don't use the windows version much, but to avoid breaking some batch files and stuff that rely on it, I also named the gnu version gsort.exe
You can distinguish between the two
$ sort /? |head
SORT [/R] [/+n] [/M kilobytes] [/L locale] [/REC recordbytes]
[[drive1:][path1]filename1] [/T [drive2:][path2]]
/+n Specifies the character number, n, to
begin each comparison. /+3 indicates th
each comparison should begin at the 3rd
character in each line. Lines with fewe
than n characters collate before other l
By default comparisons start at the firs
character in each line.
$ gsort /?
gsort: open failed: /?: Invalid argument
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||