mclip(1) mclip(1) NAME mclip - Command line utility to read and write X selections (aka clip- boards) SYNOPSIS mclip [OPTION]... [FILE]... DESCRIPTION mclip is a command line tool to communicate with the X selection mecha- nism. If no FILE is given, mclip runs in read mode: it prints out the content of the selection to standard output. Otherwise, it runs in write mode, in which it reads the contents of the FILEs, concatenates them, and puts the result to the selection. After mclip exits, a child process remains in the background until some other application takes over the selection. A FILE may be specified as "-", in which case text is read from stan- dard input. An X server has unlimited number of different selections, each of which is identified by a unique name. Of these, only two is commonly used: PRIMARY and CLIPBOARD. The PRIMARY selection is used to hold text in the area currently selected by mouse, and usually pasted by middle-but- ton-click. The CLIPBOARD selection is usually operated through explicit "Cut", "Copy" and "Paste" operations via menus or keyboard shortcuts. mclip operates on the CLIPBOARD selection by default, or PRIMARY when -p option is given. You can use other selections by giving -s option. OPTIONS -c Same as --selection=CLIPBOARD. This is the default. --display=NAME Use X display NAME. The default is taken from the environment variable DISPLAY. -h, --help Print usage information and exit. -p Same as --selection=PRIMARY. -r, --read Force read mode. -s, --selection=SELECTION Operate on the X selection named SELECTION. --version Print version information and exit. -w, --write Force write mode. EXAMPLES Print out the contents of the selection. $ mclip Put current date and time to the selection. $ date | mclip - Html-escape the clipboard content. $ mclip | sed -e 's//\>/g' | mclip - Append the contents of ~/signature to the clipboard. $ mclip | mclip - ~/signature In vi, paste the content of the PRIMARY selection into the buffer. :r! mclip -p BUGS Report bugs to . 2008-02-21 mclip(1)