- Aug
- 2,799
- 144
This works from PowerShell 5.1
This also works from PowerShell 5.1
This does not work from TCC;
Results from TCC;
This does not work from TCC running PSCode.ps1
I'm thinking that the \r?\n in the PowerShell 5.1 code is not welcomed by TCC.
Joe
Code:
PS R:\temp> get-content function:tcc
& "C:\Program Files\JPSoft\TCMD36\tcc.exe" /I /Q /C $args
PS R:\temp>
PS R:\temp> tcc "echo Line1^nLine2^nLine3 > clip:"
PS R:\temp> tcc type clip:
Line1
Line2
Line3
PS R:\temp> .\pscode.ps1
Line1 Line2 Line3
PS R:\temp> type .\pscode.ps1
$continuous = (Get-Clipboard -Raw) -replace "\r?\n", " "
$continuous
PS R:\temp>
This also works from PowerShell 5.1
Code:
PS R:\temp> tcc "echo Line1^nLine2^nLine3 > clip:"
PS R:\temp> tcc type clip:
Line1
Line2
Line3
PS R:\temp> $continuous = (Get-Clipboard -Raw) -replace "\r?\n", " "
PS R:\temp> $continuous
Line1 Line2 Line3
PS R:\temp>
This does not work from TCC;
Code:
ver
echo Line1^nLine2^nLine3 > clip:
echo Contents of Windows Clipboard
type clip:
pshell /s "$continuous = (Get-Clipboard -Raw) -replace "\r?\n", " ""
echo After removal of CRLF from contents of Windows Clipboard
pshell /s "$continuous"
Results from TCC;
Code:
TCC 36.52.88 x64 Windows 10 [Version 10.0.19045.7663]
Contents of Windows Clipboard
Line1
Line2
Line3
After removal of CRLF from contents of Windows Clipboard
R:\>
This does not work from TCC running PSCode.ps1
Code:
R:\>ver
TCC 36.52.88 x64 Windows 10 [Version 10.0.19045.7663]
R:\>type clip:
Line1
Line2
Line3
R:\>type r:\temp\pscode.ps1
$continuous = (Get-Clipboard -Raw) -replace "\r?\n", " "
$continuous
R:\>pshell r:\temp\pscode.ps1
R:\>
I'm thinking that the \r?\n in the PowerShell 5.1 code is not welcomed by TCC.
Joe
Last edited: