Ticket #39287

Side effect of redirections (w/o command name)

Open Date: 2019-06-02 15:46 Last Update: 2019-06-02 15:46

Reporter:
Owner:
Type:
Status:
Open [Owner assigned]
Component:
MileStone:
(None)
Priority:
3
Severity:
3
Resolution:
None
File:
None
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

POSIX says:

If there is no command name, any redirections shall be performed in a subshell environment

This means any side effect that may occur in redirections should not persist after the command.

unset X
< ${X=2}
echo "${X-1}" # should be 1
unset X
<<-EOF
${X=2}
EOF
echo "${X-1}" # should be 1

I don't know if this interpretation is really intended.

Ticket History (1/1 Histories)

2019-06-02 15:46 Updated by: magicant
  • New Ticket "Side effect of redirections (w/o command name)" created

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login