24 echo "Turning Off - Static IP"
25
26 echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > "${NETWORK}"
27 echo "# Include files from /etc/network/interfaces.d:" >> "${NETWORK}"28 echo "source-directory /etc/network/interface" >> "${NETWORK}"
29 echo "" >> "${NETWORK}"
30 echo "# Set static ip on ethernet interface of 192.168.3.100" >> "${NETWORK}"
6 echo "Turning On - Static IP"
7
8 echo "# interfaces(5) file used by ifup(8) and ifdown(8)" > "${NETWORK}"
9 echo "# Include files from /etc/network/interfaces.d:" >> "${NETWORK}"10 echo "source-directory /etc/network/interface" >> "${NETWORK}"
11 echo "" >> "${NETWORK}"
12 echo "# Set static ip on ethernet interface of 192.168.3.100" >> "${NETWORK}"
50
51 # Create Control File for Tensorflow.
52 echo "Package: tensorflow-mrdt" > /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_arm64/DEBIAN/control
53 echo "Version: ${TENSORFLOW_VERSION}" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_arm64/DEBIAN/control 54 echo "Maintainer: google" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_arm64/DEBIAN/control
55 echo "Depends:" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_arm64/DEBIAN/control
56 echo "Architecture: arm64" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_arm64/DEBIAN/control
51
52 # Create Control File for Tensorflow AMD64.
53 echo "Package: tensorflow-mrdt" > /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_amd64/DEBIAN/control
54 echo "Version: ${TENSORFLOW_VERSION}" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_amd64/DEBIAN/control 55 echo "Maintainer: google" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_amd64/DEBIAN/control
56 echo "Depends:" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_amd64/DEBIAN/control
57 echo "Architecture: amd64" >> /tmp/pkg/tensorflow_${TENSORFLOW_VERSION}_amd64/DEBIAN/control
27
28 # Create Control File
29 echo "Package: quill-mrdt" > /tmp/pkg/quill_${QUILL_VERSION}_arm64/DEBIAN/control
30 echo "Version: ${QUILL_VERSION}" >> /tmp/pkg/quill_${QUILL_VERSION}_arm64/DEBIAN/control31 echo "Maintainer: odygrd" >> /tmp/pkg/quill_${QUILL_VERSION}_arm64/DEBIAN/control
32 echo "Depends:" >> /tmp/pkg/quill_${QUILL_VERSION}_arm64/DEBIAN/control
33 echo "Architecture: arm64" >> /tmp/pkg/quill_${QUILL_VERSION}_arm64/DEBIAN/control
Rather than adding >> something
after every single line, you can simply group the relevant commands and redirect the group. Now the file has to be opened and closed only once, which can be a performance gain.
echo foo >> file
date >> file
cat stuff >> file
{
echo foo
date
cat stuff
} >> file