Remove White Spaces From A text File Using Powershell

To remove white spaces from a text file using powershell use:

$content = Get-Content myfile.txt | $content | Foreach {$_.TrimEnd()}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.