例如,要想test.txt文件添加内容"I am a boy",test.txt在当前目录中 方法一:vi编辑法 打开终端,输入vi test.txt 回车,按a或i进入编辑模式,输入 I am a boy,然后按esc键退出编辑模式,输入:wq保存并退出. 方法二:echo命令法 打开终端,输入echo 'I am a boy' >> ./test.txt 注:追加单行文本法 方法三:cat命令法 cat >> ./test.txt <<EOF I
Android开发过程中在sh,py,mk文件中添加log信息的方法 在sh文件中: echo "this is a log info" + $info 在py文件中: print ("this is a log info ",info) 在mk文件中 $(warning warning:'this is a log info')