Skip to content

Instantly share code, notes, and snippets.

@vor0nwe
vor0nwe / clip
Last active September 13, 2023 14:59
clip: WSL bash script to access the Windows Clipboard (both read and write)
#!/bin/bash
[[ ! -t 1 ]] && powershell.exe Get-Clipboard
[[ ! -t 0 ]] && clip.exe
if [[ -t 1 && -t 0 ]]; then
echo Nothing specified to copy or paste! >&2
exit 1
fi