没有像“ append”运算符这样的“ prepend”运算符
>>,但是您可以将标头写入临时文件,然后将文件内容复制到临时文件中,然后将其移回:
echo -e "nametagetuniversitytcity" | cat - yourfile > /tmp/out && mv /tmp/out yourfile

没有像“ append”运算符这样的“ prepend”运算符
>>,但是您可以将标头写入临时文件,然后将文件内容复制到临时文件中,然后将其移回:
echo -e "nametagetuniversitytcity" | cat - yourfile > /tmp/out && mv /tmp/out yourfile