Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-07-28 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls