Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Sort-stability/AppleScript/sort-stability-1.applescript
Normal file
10
Task/Sort-stability/AppleScript/sort-stability-1.applescript
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
set aTable to "UK London
|
||||
US New York
|
||||
US Birmingham
|
||||
UK Birmingham"
|
||||
|
||||
-- -s = stable sort; -t sets the field separator, -k sets the sort "column" range in field numbers.
|
||||
set stableSortedOnColumn2 to (do shell script ("sort -st'" & tab & "' -k2,2 <<<" & quoted form of aTable))
|
||||
set stableSortedOnColumn1 to (do shell script ("sort -st'" & tab & "' -k1,1 <<<" & quoted form of aTable))
|
||||
return "Stable sorted on column 2:" & (linefeed & stableSortedOnColumn2) & (linefeed & linefeed & ¬
|
||||
"Stable sorted on column 1:") & (linefeed & stableSortedOnColumn1)
|
||||
11
Task/Sort-stability/AppleScript/sort-stability-2.applescript
Normal file
11
Task/Sort-stability/AppleScript/sort-stability-2.applescript
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
"Stable sorted on column 2:
|
||||
US Birmingham
|
||||
UK Birmingham
|
||||
UK London
|
||||
US New York
|
||||
|
||||
Stable sorted on column 1:
|
||||
UK London
|
||||
UK Birmingham
|
||||
US New York
|
||||
US Birmingham"
|
||||
Loading…
Add table
Add a link
Reference in a new issue