我在终端写这个:
printf ' \n\necho -e \"writes (>> appends) in note.txt this text'\n'on 2lines (with "-e" and "'\n'" help)\" >> note.txt\n' > note.txt
Run Code Online (Sandbox Code Playgroud)
我得到了这个note.txt:
echo -e "writes (>> appends) in note.txt this textnon 2lines (with "-e" and "n" help)" >> note.txt
Run Code Online (Sandbox Code Playgroud)
我想把它放进去note.txt:
echo -e "writes (>> appends) in note.txt this text\non 2lines (with "-e" and "\n" help)" >> note.txt
Run Code Online (Sandbox Code Playgroud)
( \- 不见了)