<trivial>
I make no secret of the fact that I'm a bit of a PowerShell fanboy
You can do anything on a PC with PS but...
...even I have to admit that 'there is always another gotcha'
just when you think it was done.
My personal peeve is blank lines, PS just loves outputting blank lines
Well that and spurious/obvious/annoying header lines
<sulk>I just want my stuff.</sulk>
So tonight I decided wanted the equivalent of the ol' DOS dir/w but without all the baggage
Why can't I just set a -JustGiveMeMyStuff flag?
So I ended up with this in my default $profile
It will be of absolutely no consequence to anybody else ever but
I'm feeling undeservedly smug at the moment so I have to tell somebody...
function dirw {
param ($x)
(Get-ChildItem $x | Format-Wide -AutoSize | Out-String) `
-Replace '(\r\n)+', "`r`n" -Replace '\r\n *Directory: .*\r\n',""
}
have a nice evening.
</trivial>