in reply to Re^12: let Makefile.PL to do the Readme file for me -- new target? (Powershell)
in thread let Makefile.PL to do the Readme file for me -- new target?
PowerShell is a very interesting and powerful language, which also borrowed many aspects from Perl and some from Haskell.
I never worked with PowerShell, except for casting a few magic spells copied from Google results to make Windows behave.
- Interesting b/c instead of piping text, they are piping objects (in the first draft the language was named "Monad")
- Powerfull because these object have deep access into the OS and .NET-framework.
That should allow doing interesting things WITHIN the PowerShell/.NET walled garden. As long as you can use those objects, everything should be fine (except for bugs). But what about Unix-style interactions with other programs? Piping objects arounds surely is a powerful concept, but can I stuff binary data from STDOUT of tool A into a pipe, then filter it through B, C, D, and finally have E process the result of filtering? (In other words, what's the equivalent of a bash on Unix doing A -foo -bar | B -bla bla | C --what=ever | D ./magic ./stuff | E +gnarf)
What about networking? I often do things like this:
tar -C /some/where -cf - subtree | ssh root@embedded.system tar -C /else/where -xvf - > copied.txt 2> problems.txt(Create a tar archive of subtree in /some/where and write to STDOUT, have ssh pass that byte stream to another tar instance running as root on embedded.system as STDIN, make that second tar extract the archive to /else/where, write STDOUT of the second tar to copied.txt on the local system, and STDERR to problems.txt on the local system.)
What about quoting? Quoting the two redirections in the previous command would write STDOUT and STDERR of the second tar to embedded.system, because ssh implicitly invokes a shell on embedded.system:
tar -C /some/where -cf - subtree | ssh root@embedded.system tar -C /else/where -xvf - '>' copied.txt '2>' problems.txtHow to pass things like ", ', <, >, | as arguments? On Unix:
echo '"' "'" \< ">" "|"Expanding variables, and passing parameters that just look like variable expansions?
echo '$PATH' "expands to \"$PATH\""Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^14: let Makefile.PL to do the Readme file for me -- new target? (Powershell)
by LanX (Saint) on Jan 22, 2021 at 08:10 UTC |