我刚刚运行了一项需要几个小时的工作,但我忘记将该文本通过管道传输到文本文件中。
伪代码:
echo [previous text output] > OutputHistory.txt
此外,我不能只是“复制和粘贴”我的终端中的内容,因为 1) 显示省略了重要的格式化字符,例如“\t”,并且 2,我可能已经关闭了终端窗口。
任何Unix命令都可以做到这一点吗?
command-line terminal pipe history
command-line ×1
history ×1
pipe ×1
terminal ×1