Output of a command within here-document

I have a script which contains the code block: cat << EOF > new_script.sh … echo "$(pwd)" >> log.txt … EOF The script new_script.sh is set to run at a later time. Bash recognizes the $(pwd) within the script and evaluates it before it looks at the entire EOF block, so the pwd of the… Read More Output of a command within here-document

Creating a new file and add some text to it using bash

I’m making a basic installation script (my first to be precise) for LAMP, and I experienced some difficulties: I trying to put some configuration in a new file, in this case for ssl-params My humble code: cat > /etc/apache2/conf-available/ssl-params.conf << ENDOFFILE SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 SSLHonorCipherOrder On Header always set X-Frame-Options… Read More Creating a new file and add some text to it using bash