I donβt know if bash works this way, but in ksh there is a βwhereβ command that tells you what exactly will be executed if you have to enter an argument as a command, while βwhatβ just tells you the first command instance in $ PATH For example:
wembley 0 /home/jj33 > which ls /bin/ls wembley 0 /home/jj33 > whence ls '/bin/ls -FC'
I doubt this is your problem, but the next troubleshooting step would be to specify the exact path (or to avoid a possible alias with a backslash) to βsortβ during its execution:
$ echo -e "2\n1\n3\n5\n4" | /bin/sort -R
After that, I can suspect an environment or locale setting that makes it unstable. Not necessarily important, but LC_ * variables often have unexpected side effects (the first thing I do in a new window is set LC_ALL = C to disable all this)).
jj33
source share