I have an 12.sh file with the below code
cat > /home/12.txt << "EOF"
[Unit]
${OUTPUT}
EOF
OUTPUT is an environment variable i want to import its value into the 12.txt file when i execute 12.sh file
Any one can tell how to do , Thanks in advance
I have an 12.sh file with the below code
cat > /home/12.txt << "EOF"
[Unit]
${OUTPUT}
EOF
OUTPUT is an environment variable i want to import its value into the 12.txt file when i execute 12.sh file
Any one can tell how to do , Thanks in advance
You don't need to use cat, just echo the data required are redirect the output to the file
echo -e "[Unit]\n$OUTPUT" > /home/12.txt