Copiar texto desde la terminal al portapapeles a través de comandos

24 08 2011

Para copiar texto desde la terminal al portapapeles se puede usar el comando xclip.

Copiar el texto al portapapeles por defecto (XA_CLIPBOARD):
# echo "hola" | xclip -selection clipboard

Copiar el texto al portapapeles secundario, el tercer botón del ratón (XA_SECONDARY):
# echo "hola" | xclip -selection primary

Referencia:
http://linuxtidbits.wordpress.com/2008/02/22/command-line-to-clipboard/

About these ads

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.

%d bloggers like this: