I am wondering whether anyone came up with good use cases of the $^
and $$
automatic variables in Powershell. At the moment I am not seeing much use for them, at least from a programmer perspective.
When using PS interactively and executing a long command you could use .$^
to repeat it and with $$
you could get the last argument, but .$^
looks awkward enough to me that I don't consider that something people would use every day. Furthermore, since $$
only yields the last argument it's probably similarly difficult to use effectively.
But maybe I'm just mistaken and they have useful uses and I just can't see them.