Answers for "copy cat command output to clipboard"

0

copy cat command output to clipboard

# This can either be done with xclip or an npm package called clipboard-cli

# With xclip, you would need to sudo install xclip, then use it as so
cat file.txt | xclip

# To paste using sclip
xclip -o

# With the clipboard-cli npm package

# first install globally
npm install --global clipboard-cli

# Then it can be used as follows
cat file.txt | clipboard-cli

# To paste
clipboard
Posted by: Guest on January-15-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language