Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
たとえば、次のコードがあります。
rm /etc/rc.local cat <<EOF >/etc/rc.local #!/bin/sh -e apt-get update && apt-get -y install git-core EOF
元の rc.local を削除して新しいものを作成する必要がないようにする代わりに、ほとんど同じコードを使用して、このコンテンツを rc.local ファイルの末尾に追加する方法はありますか? 、それを再作成するのではなく?
これを試して :
cat <<EOF >>/etc/rc.local apt-get update && apt-get -y install git-core EOF
または単に:
echo 'apt-get update && apt-get -y install git-core' >> /etc/rc.local