Normally we can source ~/.bashrc file using this command
source ~/.bashrc
but if I write this in a shell script and execute it, nothing happen. Why?
Is there any way to do this?
my shell code:
#!/bin/bash
chmod a+x ~/.bashrc
source ~/.bashrc
Also tried .[dot] instead of source. Same result