in reply to $^O empty in windows powershell
PS copied many concepts from Bash and Perl. (After all it's an attempt to fix problems with cmd and bat and full of aliases to support *nix commands)
For instance
C:\tmp>powershell Windows PowerShell Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. PS C:\tmp> $x="xxx" PS C:\tmp> echo "a${x}b" axxxb PS C:\tmp> echo 'a${x}b' a${x}b PS C:\tmp> exit C:\tmp>
That's why you need a single-quoted string for perl -e
Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: $^O empty in windows powershell
by WithABeard (Beadle) on Nov 22, 2022 at 14:17 UTC | |
by LanX (Saint) on Nov 22, 2022 at 14:48 UTC | |
by LanX (Saint) on Nov 22, 2022 at 20:43 UTC | |
by eyepopslikeamosquito (Archbishop) on Nov 22, 2022 at 21:56 UTC | |
by LanX (Saint) on Nov 22, 2022 at 22:17 UTC |