Skip to content

Instantly share code, notes, and snippets.

@mostafabahri
Created October 10, 2018 09:23
Show Gist options
  • Save mostafabahri/bba03af69a9bb6fe928d3c8f5e6d74f3 to your computer and use it in GitHub Desktop.
Save mostafabahri/bba03af69a9bb6fe928d3c8f5e6d74f3 to your computer and use it in GitHub Desktop.
Copy to clipboard and clean after 10 seconds
#!/bin/bash
cat - | xclip -selection c
(sleep ${1:-10}
xsel -bc) &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment