I am not strong in PowerShell. Previous script sends data from clipboard
ONLY to console, it doesn't send them to STDOUT and such script cannot
be used to pipe data to other commands. This is version of script that
really sends data from clipbaord to the 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
Set-Clipboard # clear clipboard
while ($true) {
   $TXT = Get-Clipboard # read clipboard
   if ($TXT) {
      Write-Output "$TXT"
      Set-Clipboard # clear clipboard
   }
   else {
      Start-Sleep -Milliseconds 100 # sleep 100ms
   }
}
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1854092

Title:
  pbcopy & pbpaste for Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xsel/+bug/1854092/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to