如果我做
$ cat > file.txt
Run Code Online (Sandbox Code Playgroud)
文本Ctrl- DCtrl-D
问题 1:如果我不按 Enter,为什么我必须按Ctrl-D两次?
如果我做
$ cat > file.txt
Run Code Online (Sandbox Code Playgroud)
pa bam pshhh Ctrl-Z
[2]+ Stopped cat > file.txt
$ cat file.txt
$ cat > file.txt
Run Code Online (Sandbox Code Playgroud)
pa bam pshhh
Ctrl——Z
[2]+ Stopped cat > file.txt
$ cat file.txt
pa bam pshhh
Run Code Online (Sandbox Code Playgroud)
为什么第二次是 1 行的文件?