Last active
October 4, 2022 15:56
-
-
Save mrhammadasif/23e948eed927db04ca17ecd291f31431 to your computer and use it in GitHub Desktop.
Generate fake data using Chance-CLI and copy to clipboard (MacOS)
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
fake() { | |
if [[ -z $1 ]]; then | |
echo "Provide a chance generator:" | |
exit 1 | |
fi | |
tocopy=$(chance "$@") | |
echo $tocopy | |
echo $tocopy | tr -d '\n' | pbcopy | |
echo "\nCopied to Clipboard!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update 2022-10-04: removed new-line characters when using pbcopy