4 ms·
Powershell's object pipeline is a great idea. Its interface with the text world trips over at the last hurdle, because it truncates lines at terminal width even
by pjc50 12y ago
Powershell's object pipeline is a great idea. Its interface with the text world trips over at the last hurdle, because it truncates lines at terminal width even if redirected into a file.
I have in my notes:
<pre>Select-String " 23:56.00" -Path file.txt | out-string -width 10000</pre>
better (no headers):
<pre>Select-String " 23:56.00" -Path file.txt | ForEach-Object { Write-Output $_.Line } | Out-File t.txt</pre>
I eventually installed a proper grep and gave up trying to use Select-String.
The hoops you have to jump through to write and run script files are absurd as well, compared to UNIX where you just need to set the executable bit.
- chris_wot 12y agoHang on... Are those commands working? Out-string -width 10000 should work! I guess PowerShell has a different take on things.