Skip to content
Advertisement

How to include path inside bashrc in linux for envirnment

Im testing my code for automation of the installation of a software

In bashrc file below:

JavaScript

Here im trying to add $SCALA_HOME/bin to PATH.

this is the required output:

JavaScript

the above code worked to append SCALA_HOME above path but for appending in the same line im not able to do

JavaScript

please help me get the correct sed command to append SCALA_HOME in the PATH

Advertisement

Answer

You can use this: sed '/export PATH/ s/$/:$SCALA_HOME/bin/' .bashrc

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement