Created
October 3, 2022 16:54
-
-
Save heywoodlh/d3ccf4723d260d7300e6bfa648cdc74c to your computer and use it in GitHub Desktop.
Cross-platform (MacOS, Linux, FreeBSD) pbcopy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if uname -a | grep -iq Darwin &>/dev/null | |
then | |
/usr/bin/pbcopy | |
else | |
xclip -r -selection clipboard | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment