Description of problem: sorting files produces error message for "-S 3g" but NOT for "-S3g". Version-Release number of selected component (if applicable): sort 8.23 (coreutils-8.23-11.fc22.x86_64) How reproducible: always Steps to Reproduce: 1.see additional info 2. 3. Actual results: Expected results: Additional info: # this seems to work sort -T $sorttmp -S"3g" -uk1 | egrep -v '^$' | egrep '\.com' < 1000s > 1000s.srtd # this does not note the blank after "-S" sort -T $sorttmp -S "3g" -uk1 | egrep -v '^$' | egrep '\.com' < 1000s > 1000s.srtd sort: cannot read: 3g: No such file or directory which sort /bin/sort sort --version sort (GNU coreutils) 8.23 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and Paul Eggert.
(In reply to George R. Goffe from comment #0) > # this seems to work > > sort -T $sorttmp -S"3g" -uk1 | egrep -v '^$' | egrep '\.com' < 1000s > > 1000s.srtd I guess the only problem is that $sorttmp expands to an empty string. So in the above case "-S3g" is consumed as an operand of the -T option. > # this does not note the blank after "-S" > > sort -T $sorttmp -S "3g" -uk1 | egrep -v '^$' | egrep '\.com' < 1000s > > 1000s.srtd > > sort: cannot read: 3g: No such file or directory In this case, only "-S" is consumed as operand of the -T option. So the string "3g" is interpreted as an input file.