Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: $^O empty in windows powershell -- portableshell.bat ?

by LanX (Saint)
on Nov 22, 2022 at 09:20 UTC ( [id://11148300]=note: print w/replies, xml ) Need Help??


in reply to Re: $^O empty in windows powershell -- portableshell.bat ?
in thread $^O empty in windows powershell

you have to distinguish between console/terminal-window and a shell running within°, and you can run multiple shells nested within each other.²

in your case portableshell.bat starts a fresh cmd° shell as a sub-process inside the current terminal window, after typing exit you'll be back to the outer powershell.

compare

C:\tmp> C:\tmp>cmd # new sub shell Microsoft Windows [Version 10.0.19044.2251] (c) Microsoft Corporation. Alle Rechte vorbehalten. C:\tmp>exit # leave sub shell C:\tmp>

vs

C:\tmp>start cmd # new window with su +b shell C:\tmp>

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

°) that's mostly *nix speak, not sure how they call these on win

²) the motivation for the name "shell" is a surrounding process managing an environment for sub-processes

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148300]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-20 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found