我正在编写一个 bash 脚本来查找不存在的文件,然后创建它并将其附加到它:
Host localhost
ForwardAgent yes
Run Code Online (Sandbox Code Playgroud)
所以"line then new line 'tab' then text"
我认为它是一种敏感的格式。我知道你可以这样做:
cat temp.txt >> data.txt
Run Code Online (Sandbox Code Playgroud)
但它看起来很奇怪,因为它有两行。有没有办法以这种格式附加它:
echo "hello" >> greetings.txt
Run Code Online (Sandbox Code Playgroud)