#1074179 coreutils: ptx: -i and -o read each line as a token, contrary to V7 (and thus all others) which tokensie them normally

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2024-06-24 13:00:04 UTC
Severity:
normal
#1074179#5
Date:
2024-06-24 12:20:08 UTC
From:
To:
Dear Maintainer,

Observe:
$ echo adenosine triphosphate | ptx
                                       adenosine triphosphate
                           adenosine   triphosphate
$ echo adenosine triphosphate | ptx -i <(echo 'adenosine triphosphate')
                                       adenosine triphosphate
                           adenosine   triphosphate

Compare:
$ echo adenosine triphosphate | ./4.4ptx -i /dev/null /dev/stdin /dev/tty
.xx "" "" "adenosine triphosphate" ""
.xx "" "adenosine" "triphosphate" ""
$ echo adenosine triphosphate | ./4.4ptx -i <(echo 'adenosine triphosphate') /dev/stdin /dev/tty

Clearly 4.4BSD ptx
(which is functionally identical to v7 ptx and, thus, every other ptx)
tokenises its -i/-o file
(as hinted with "Use as keywords only the words given in the only file.").

Conversely, coreutils ptx seems to have analysed
the input as "ignore 'adenosine triphosphate' as a token".
Which is obviously wrong.

Best,