On Windows, try: echo hello | clip On Linux, try: echo hello | xclip On Mac OS X, try: echo hello | pbcopy / pbpaste For example, you might do (cat myFile.txt | xclip). This would basically allow you to edit the clipboard directly.