PowerShell setting environment variable to subexpression discards newline
PowerShell setting environment variable to subexpression discards newline Question: I have a python script: # temp.py print("foonbar") I can run this in powershell: > python .temp.py foo bar I want to set the environment variable FOO to the output of this python script. However, doing so changes the newline to a space: > $env:FOO=$(python .temp.py) …