我已经找过了,但什么也找不到。例如,我使用的TTS程序可以让您执行以下操作:
~#festival -tts | echo "I am to be spoken"这真的很好,但是对于我使用的程序,比如hexdump,我不知道如何将文本输入其中。我真的可以使用其中的一些东西,一些我尝试过(但失败了)的例子如下:
~#gtextpad < dmesg
//(how do I put the contents into the text pad for display? not just into a file)
~#hexdump | echo "I am to be put into hexdump"
//(How do I get hexdump to read the echo? It normally reads a file such as foo.txt..)发布于 2010-02-07 13:29:55
以下是将文本传递到十六进制转储的一些方法
标准输入:
echo "text" | hexdump
此处为文档
hexdump <<EOF
text
EOF处理整个文件
hexdump file发布于 2013-07-14 06:30:30
在bash上,您还可以
hexdump <<< "Pipe this text into hexdump"发布于 2010-02-07 13:20:35
管道中的数据流(由管道符号分隔的一系列命令)从左到右流动。因此,下面command1的输出转到command2的输入,依此类推。
command1 |
command2 |
command3 arg1 arg2 arg3 |
sort |
more因此,要将'echo‘的输出转换为'hexdump',请使用:
echo "I am to be dumped" | hexdump我不明白你所显示的“节日”命令是如何工作的。shell已经做了足够的检查,没有做不必要的假设,做了很多骗局,然后仍然依赖于内核中的调度决策来让事情“正确”,我看不出它可以如何工作。
https://stackoverflow.com/questions/2216016
复制相似问题