I have been create a sh file to automate next spark instalations. In the file I am putting the following steps:
sudo apt install openjdk-8-jdk scala -y
java -version; javac -version; scala -version; git --version
wget https://downloads.apache.org/spark/spark-3.1.3/spark-3.1.3-bin-hadoop3.2.tgz
tar xvf spark-*
sudo mv spark-3.1.3-bin-hadoop3.2 /opt/spark
echo "export SPARK_HOME=/opt/spark" >> ~/.bashrc
echo "export PATH=$PATH:$SPARK_HOME/bin:$SPARK_HOME/sbin" >> ~/.bashrc
Up to line 6, the process works as expected, but at the last step, instead of writing exactly what I requested, it is converting the environment variables to their real values and writing the real values to bashrc. I need to write in the bashrc file exactly what I requested in the echo, without converting the environment variables.
Is it possible?