4 examples for xclip

{{ score }}
  # Copy the text "foo" to primary selection.
echo "foo" | xclip

# Copy the text "bar" to clipboard selection.
echo "bar" | xclip -selection clipboard

# Copy the text "yo" to primary AND clipboard selection for pasting EVERYWHERE!
# (Psst, "alias xclip='xclip -i -sel c -f | xclip -i -sel p'")
echo "yo" | xclip -i -sel c -f | xclip -i -sel p
        
{{ score }}
  # Copy in clipboard
xclip -sel clip < foo.txt
        
{{ score }}
  # Put the text "Hi." into the primary selection.
echo "Hi." | xclip
        
{{ score }}
  # Copia en el portapapeles el contenid de un archivo indicado
xclip -sel clip < ~/.ssh/id_rsa.pub