Created
November 20, 2024 20:54
-
-
Save JohnL4/c2c8aed4f969a54af4a0dd20afe3502e to your computer and use it in GitHub Desktop.
How to get a PowerShell pipeline to emit plain text, not objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When invoking from PowerShell, you can pass a stream of file names in a pipeline as follows: | |
ls VP_CLIENT/*.sql -rec | select -expand FullName | py ../InternalTools/Export-VP_DDL/fix-anonymous-sequences.py | |
(The ``select -expand`` is key -- The list of filenames will appear on this script's stdin as lines of text.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment