bash cat EOF in Datei – minimales Beispiel
English
Deutsch
Dies ist ein Beispiel für die Verwendung eines Here-Dokuments (Heredoc) in bash, um einen Inline-String in eine Datei zu schreiben.
bash-cat-eof-to-file-minimal-example.sh
cat <<EOF >/etc/dhcp/dhcpd.conf
authoritative;
default-lease-time 86400;
max-lease-time 86400;
subnet 192.168.99.0 netmask 255.255.255.0 {
range 192.168.99.100 192.168.99.150;
option routers 192.168.99.1;
option domain-name-servers 192.168.99.1;
option domain-name "local";
}
EOFCheck out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow