Steps:
1. sudo apt install xclip (if not installed)
2. xclip -sel c < input_file
xclip -sel c < input_file
# Basic syntax using pbcopy:
pbcopy < /path/to/file
# Paste with:
pbpaste > /path/to/output_file
# Note, you can filter what you paste with grep, e.g.:
pbpaste | grep 'useful text' > /path/to/output_file