I'm writing the contents of the clipboard to a txt using pbpaste, for some reason it deletes all newlines from the text in the clipboard.
This is the command I'm using:
echo `pbpaste` > /Users/me/file.txt
It works as expected except for the fact that none of the newlines from the clipboard contents are to be found in the target file.
Is there anyway to keep the newlines?
Yes, by eliminating echo:
pbpaste > /Users/me/file.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With