Pipe to/from the clipboard in a Bash script
The clipboard is a buffer that operating systems provide for short-term storage and transfer within and between application programs.
The clipboard provides an application programming interface by which programs can specify cut, copy and paste operations.
In the Post, I will introduct how to using xclip in Bash Script.
In ~/.bash_aliases, add:
Do not forget to load your new configuration using . ~/.bash_aliases or by restarting your profile.
In ~/.config/fish/config.fish, add:
Do not forget to restart your fish instance by restarting your terminal for changes to apply.
You can now use setclip and getclip, e.g: