Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: perl sort on windows (sort.exe , gnusort.exe )

by Anonymous Monk
on Mar 25, 2013 at 01:12 UTC ( #1025215=note: print w/ replies, xml ) Need Help??

in reply to perl sort on windows

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]] [/O [drive3:][path3]filename3] /+n Specifies the character number, n, to begin each comparison. /+3 indicates th +at each comparison should begin at the 3rd character in each line. Lines with fewe +r than n characters collate before other l +ines. By default comparisons start at the firs +t character in each line. $ gsort /? gsort: open failed: /?: Invalid argument

Comment on Re: perl sort on windows (sort.exe , gnusort.exe )
Download Code
Replies are listed 'Best First'.
Re^2: perl sort on windows (sort.exe , gnusort.exe )
by Anonymous Monk on Mar 25, 2013 at 01:13 UTC

    one came with perl,

    one came with WINDOWS, jeez

Re^2: perl sort on windows (sort.exe , gnusort.exe )
by gurpreetsingh13 (Scribe) on Mar 25, 2013 at 11:32 UTC
    sort /+2 /+4 /T $windowsDir $name /O tempLoc_$name
    This should work I believe, only problem is with numeric sort.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025215]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-11-28 02:01 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (737 votes), past polls