Created
December 4, 2016 01:52
-
-
Save Oxyd76/f46b6d4accc0166d70127e3ed49a66d3 to your computer and use it in GitHub Desktop.
Sort numbers in every string of test.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* REXX (OS/2) */ | |
Parse arg filename | |
call stream filename, 'C', 'Open' | |
Do while Lines(filename) | |
line = linein(filename) | |
Parse value line with left ' ' right | |
If left > right Then line = right || ' ' || left | |
pos=stream(filename, 'C', 'Seek -'Length(line)+2) | |
call lineout filename, line | |
End | |
call stream filename, 'C', 'Close' | |
Exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 34 | |
8 66 | |
1 9 | |
4 10 | |
1 99 | |
98 325 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 34 | |
66 8 | |
1 9 | |
10 4 | |
99 1 | |
325 98 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment