Hello,
When I paste the contents of the clipboard to the command line via pbpaste, there is also a carriage return implicitly pasted (i.e. whatever gets pasted is automatically sent as a command). Is there a way to use pbpaste without this feature, so I can edit the text before sending the command?
You're right. Once it is pasted, a new prompt appears immediately to the right of the paste, and the pasted text cannot be edited to launch as a command. Do you know if there is a way to do this?
cat file
1 aaa
2 bbb
3 ccc
4 ddd
In TextEdit, I then copy the characters “ccc” to the clipboard. The problem is that the following command gives no output:
bash-3.2$ pbpaste | grep - file
Desired output:
3 ccc
What should the syntax be for that command? I am using MacOS El... (3 Replies)
Hello,
Here is what I am trying to do:
1) Copy a string to the pasteboard using Command-C
2) Search for the string in a file in X11.
Command-C
pbaste | grep - filname (does NOT work)
What is the correct syntax?
Thanks! (4 Replies)