#!/bin/bash
kernel="2.6.39";
distro="xyz";
echo <<< EOL
line 1, ${kernel}
line 2,
line 3, ${distro}
line 4
line ...
EOL >> /etc/myconfig.conf;
cat /etc/myconfig.conf;
#!/bin/bash
kernel="2.6.39"
distro="xyz"
cat >/etc/myconfig.conf <<EOL
line 1, ${kernel}
line 2,
line 3, ${distro}
line 4 line
...
EOL
cat /etc/myconfig.conf
#! /bin/bash
FILE_NAME="SomeRandomFile"
touch $FILE_NAME
echo """I wrote all
the
stuff
here.
And to access a variable we can use
$FILE_NAME
""" >> $FILE_NAME
cat $FILE_NAME