[Tools] Create Files in the Terminal from the Clipboard with PBPaste

Posted answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Tools] Create Files in the Terminal from the Clipboard with PBPaste相关的知识,希望对你有一定的参考价值。

You‘ll often find yourself going through a tutorial where you need to copy some code from a webpage and create a file and paste the contents onto your local machine. Your terminal has a useful tool called "pbpaste" which allows you to paste contents into a file using a standard redirect.

 

Use:

pbpaste > ./index.html

 

It is built-in with Mac

 

You can also use `pbcopy`, checkout https://langui.sh/2010/11/14/pbpaste-pbcopy-in-mac-os-x-or-terminal-clipboard-fun/

echo Hello World! | pbcopy

 

以上是关于[Tools] Create Files in the Terminal from the Clipboard with PBPaste的主要内容,如果未能解决你的问题,请参考以下文章

[Tools] Create a Simple CLI Tool in Node.js with CAC

mysql can't create threads in threadpool

“Unicode Error ”unicodeescape" codec can't decode bytes… Cannot open text files in Python 3

Can‘t drag and drop in Ubuntu 22.04装了vmware-tools后不能拖文件

self join in sql server

mysqldump: Couldn't execute 'SET OPTION SQL_QUOTE_SHOW_CREATE=1': You have an error in y