2 ms·
pbcopy and pbpaste are among my top commandline utilities. If you are running linux in WSL, you can add the following to you path to recreate their functionalit
by wodenokoto 2y ago
pbcopy and pbpaste are among my top commandline utilities. If you are running linux in WSL, you can add the following to you path to recreate their functionality:
# pbpaste
#!/bin/bash
# Adapted from https://www.techtronic.us/pbcopy-pbpaste-for-wsl/
powershell.exe Get-Clipboard | sed 's/\r$//' | sed -z '$ s/\n$//'
exit 0
and
# pbcopy
#!/bin/bash
#Adapted from https://www.techtronic.us/pbcopy-pbpaste-for-wsl/
<&0 clip.exe
exit 0