嗨,我想在文件中添加文本。例如,我想将任务添加到 todo.txt 文件的开头。我知道,echo 'task goes here' >> todo.txt但这将行添加到文件的末尾(不是我想要的)。
echo 'task goes here' >> todo.txt
bash
bash ×1