Linux copy from pipe command All In One
Linux copy from pipe command All In One
shutdown
# Linux 关机
$ shutdown --help
$ man shutdown
Raspberry Pi
# Raspberry Pi ???
$ man shutdown | ???
macOS
# macOS ✅
$ man shutdown
$ man shutdown | pbcopy
手动复制粘贴
- 不优雅,效率太低了 💩
- 如果 man 手册存在分页, 需要一页一页的手动复制粘贴 💩
- 复制的格式,可能会错乱掉 ❌
...
$ touch shutdown.md
# 鼠标滑动全选文本,手动复制粘贴到 shutdown.md ✅
$ man shutdown
自动导出 ❌
$ man shutdown | pbcopy > shutdown.md
# vscode 中显示乱码 bug ❌
$ man shutdown > shutdown.md
# vscode 中显示乱码 ❌ ,但是 terminal 中查看却显示正常 ✅
$ cat shutdown.md
# < 这个是什么操作符号❓
$ cat < shutdown.md
https://stackoverflow.com/questions/74505387/is-this-a-pbcopy-command-garbled-bug
ASCII backspace
characters bug ❌
ASCII backspace
characters
ASCII 退格
字符
Backspace key
https://www.computerhope.com/jargon/b/backspac.htm
solution
use vscode
to fix copy from terminal encoding bug 🚀
修复
macOS
从terminal
导出man
手册到markdown
文件的时候,vscode
中显示出现的乱码
bug 🚀
vscode 全部选中 "
符号,连续两次删除后,保存即可!✅
demos
# SSH
$ ssh pi@raspberrypi.local
# 等待⌛️一分钟后,不取消就立刻关机 ✅
$ sudo shutdown -H
Linux pbcopy command garbled bug All In One
pbcopy
命令乱码 bug ❌
https://www.cnblogs.com/xgqfrms/p/16907953.html
pbcopy bug
garbled
/乱码
https://www.cnblogs.com/xgqfrms/p/16879389.html
Linux
grep
command All In One
https://www.cnblogs.com/xgqfrms/p/16900167.html
refs
https://askubuntu.com/questions/1428335/how-can-i-copy-from-a-pipe-file
©xgqfrms 2012-2025
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17316951.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2022-04-13 CSS Parent Selector :has All In One
2022-04-13 TypeScript Decorator Metadata All In One
2022-04-13 斯特鲁维测地弧 All In One
2021-04-13 _.cloneDeep & JSON deep copy bug All In One
2021-04-13 React useEffect compare old new dependency
2021-04-13 webpack & css-in-js
2021-04-13 git config & color log All In One