PowerShell version of the script that waits for data in clipboard and send them to STDOUT
``` # scb is alias for Set-Clipboard # gcb is alias for Get-Clipboard # sleep is alias for Start-Sleep
# copy data from clipboard to stdout # MAIN Set-Clipboard # clear clipboard while ($true) { $TXT = Get-Clipboard | Out-String # read clipboard if ($TXT) { Write-Host "$TXT" -NoNewLine Set-Clipboard # clear clipboard } else { Start-Sleep -Milliseconds 100 # sleep 100ms } } ```
PowerShell version of the script that waits for data in clipboard and send them to STDOUT
```
# scb is alias for Set-Clipboard
# gcb is alias for Get-Clipboard
# sleep is alias for Start-Sleep
# copy data from clipboard to stdout
# MAIN
Set-Clipboard # clear clipboard
while ($true) {
$TXT = Get-Clipboard | Out-String # read clipboard
if ($TXT) {
Write-Host "$TXT" -NoNewLine
Set-Clipboard # clear clipboard
}
else {
Start-Sleep -Milliseconds 100 # sleep 100ms
}
}
```