g-viet / til

Today I learned
6 stars 0 forks source link

Write multiple lines string using Bash with variables #95

Open g-viet opened 4 years ago

g-viet commented 4 years ago
cat >/etc/file << 'EOL'
line 1, ${kernel}
line 2, 
line 3, ${distro}
line 4 line
... 
EOL

Refs: https://stackoverflow.com/questions/7875540/how-to-write-multiple-line-string-using-bash-with-variables