读取文件的输入

Joh*_*gan 0 unix mac-osx

我正在寻找一个与cat(但不是tac)相反的unix命令。

我想要做

$ SOMECOMMAND /tmp/file
I type some content
for the file here
^D
$ cat /tmp/file
I type some content
for the file here
$
Run Code Online (Sandbox Code Playgroud)

所以,我实际上在运行命令后输入了“我输入了一些内容...”,并将其写入文件。在你提出建议之前,是的,我非常了解编辑——只是寻找一些速记。

Ign*_*ams 7

的反义词catcat

$ cat > /tmp/file
I type some content
for the file here
^D
$ cat /tmp/file
I type some content
for the file here
$
Run Code Online (Sandbox Code Playgroud)