pclist.txt
pc001
pc002
etc
I want to make sure that each pc has NO trailing invisible characters. Eg
pc001 must not have pc001<blank space><blank space>
What is the .net class to use ?
PS C:\> " aaa","aaa " | %{ "[$_]" }
[ aaa]
[aaa ]
PS C:\> " aaa","aaa " | %{ "[$($_.trim())]" }
[aaa]
[aaa]
-Paul
"IT Staff" wrote:
> .
>
Are there any functions to *determine* that a string contains trailing
characters ?
"PaulChavez" <PaulC...@discussions.microsoft.com> wrote in message
news:16C615C9-98F4-4D5C...@microsoft.com...
get-content list.txt |% {if ($_ -match "\s$"){write-host "Entry $($_)
contains trailing whitespace."}}
"IT Staff" wrote:
> .
>
Martin
"IT Staff" <jkk...@hotmail.com> wrote in message
news:uSD2aASj...@TK2MSFTNGP06.phx.gbl...