View Single Post
Old 09-19-2006   #7 (permalink)
Mark


 
 

Re: Why does get-content on a text file remove crlf when cast to a string?

"XShell" <xshell@nospam.com> wrote in message
news:ehbHZ3D3GHA.4756@TK2MSFTNGP04.phx.gbl...
>>>
>>> gci -i Assemblyinfo.cs -r | %{$contents=gc
>>> $_.FullName;doWork([system.string]::join("`r`n", $contents)) }
>>>

>
> or you can use .Net
>
> [System.IO.File]::ReadAllText(Assemblyinfo.cs)


Actually that was what I did while waiting for the answer to my newsgroup
question. But while that it the ".NET way" it is not the "PowerShell
Way".



My System SpecsSystem Spec