not_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 6 days agoanother CVElemmy.blahaj.zoneimagemessage-square51fedilinkarrow-up137
arrow-up137imageanother CVElemmy.blahaj.zonenot_IO@lemmy.blahaj.zone to Programmer Humor@programming.devEnglish · 6 days agomessage-square51fedilink
minus-square🌞 Alexander Daychilde 🌞@lemmy.worldlinkfedilinkEnglisharrow-up5·5 days agoHuh. It is worth bearing in mind not to trust $USER before doing something based on it, though, if that thing is important.
minus-squaredbx12@programming.devlinkfedilinkarrow-up2·5 days agoThe interesting thing is that bash allows writing this variable. I would’ve expected it to be readonly for obvious reasons.
minus-squarepoolcritter@pawb.sociallinkfedilinkarrow-up1·5 days agoUSER is just an environment variable in the environment block like any other; even if Bash didn’t allow changing it, any other program could.
Huh. It is worth bearing in mind not to trust $USER before doing something based on it, though, if that thing is important.
The interesting thing is that bash allows writing this variable. I would’ve expected it to be readonly for obvious reasons.
USER is just an environment variable in the environment block like any other; even if Bash didn’t allow changing it, any other program could.