What does 'bash -c' do?

Check out the man pages, either on your machine or on the Internet, like this one.

Quote:

-c string
     If the -c option is present, then commands are read from string.
     If there are arguments after the string, they are assigned to the positional
     parameters, starting with $0.

Quoting from man bash:

-c string If the -c option is present, then commands are read from string.
If there are arguments after the string, they are assigned to the positional parameters, starting with $0.

The command quoted by you would append the text in heredoc (i.e. the text in VirtualHost tag) to the file /etc/apache2/sites-available/magento-store.com.


The manual page for Bash (e.g. man bash) says that the -c option executes the commands from a string; i.e. everything inside the quotes.

Tags:

Linux

Bash