A here document is a special-purpose code block. It uses a form of I/O redirection to feed a command list to an interactive program or a command, such as ftp, cat, or the ex text editor.

learn more… | top users | synonyms

0
votes
2answers
40 views

How to pass variables from one vm to another vm using bash script

What is the proper way to pass variable from one machine to another machine via bash script? In the below code I am trying to get the input from user and want to pass the same to remote machine, but ...
1
vote
1answer
81 views

How do you embed strings within the comments within a heredoc?

This doesn't work, the comment doesn't contain the IP_ADDR string SSH_UN='user' IP_ADDR='192.168.1.101' cat <<"EOF" >> .ssh/config # VirtualBox (VB) on user's laptop at $IP_ADDR Host ...
18
votes
2answers
7k views

How do you escape characters in heredoc?

I'm working with a bash script trying to stop it from attempting to replace variables inside my heredoc. How do set a heredoc to either A) escape the variable names instead of parsing them or B) ...