I need to write a shell script to set environment variable and modify path variable permanently. Is there in any way to modify bashrc file through script?
Yes, you write a script that appends to .bashrc with the >> redirection operator:
echo Your Text >> ~/.bashrc
See also I/O Redirection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With