Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    Have fun trying to use _ as a variable though ;-). It’s effectively write-only and the value is lost immediately. Commented Apr 9, 2018 at 21:06
  • 1
    Also, internally Bash does treat _ as a variable, which is why it appears in the output of set. However it can’t be marked as exported as far as I can determine. Commented Apr 9, 2018 at 21:07
  • 2
    @StephenKitt, but Bash 4.4 allows marking it read-only. Or an integer. With somewhat hilarious results. Commented Apr 9, 2018 at 21:10
  • 1
    Ha, nice find, that’s rather amusing! Commented Apr 9, 2018 at 21:14