Paste.exe for copying contents of windows clipboard to STDOUT
I use clip.exe heavily; it is VERY convenient.
Having a companion paste.exe that copies the contents of the clipboard to STDOUT.
Some examples of usage:
# Copy clipboard to a file
$ paste.exe > foo.txt
# Perform a transform on the clipboard data
$ paste.exe | tr , '\n' | clip.exe
# Search the clipboard
$ paste.exe | grep "email = "
A workaround has been identified - see https://stackoverflow.com/questions/55974462/pipe-from-clipboard-in-linux-subsytem-for-windows/56584029#56584029.
alias paste.exe="powershell.exe Get-Clipboard | perl -p -e 's/\r\n$//'"
@Cyrille Lefevre - that is a good point. The name should probably be something else then. Perhaps "cbpaste.exe"
Cyrille Lefevre commented
paste is a standard unix command : merge lines of files
Satish Kamatkar commented
Oops - I see I didn't finish that second sentence. Should read "Having a companion paste.exe that copies the contents of the clipboard to STDOUT would be awesome."