So I was trying to do some simple text manipulation. I found that when just writing to a file of a different name using the code below it works fine:
PS C:\Users\uzfm> Get-Content .\pathSystem.txt | %{$_ -replace ";","`r`n"} > .\pathSystem1.txt
But if I try to just overwrite to the original file like such:
PS C:\Users\uzfm> Get-Content .\pathSystem.txt | %{$_ -replace ";","`r`n"} > .\pathSystem.txt
The command is stuck in an infinite loop and I am just trying to understand the underlying reason as to this functionality when trying to overwrite the file.
If there is a way that works that would be appreciated also.