Reload .profile to Modify Corrupted .bashrc
If something went wrong with the .bashrc file (and sourced it), such as:
The misapplied export command for exporting a path causes the path leads to nowhere and resulted in command not found.
Type in the following command to reload .profile:
#
. ~/.profileThen open the editor to modify the .bashrc file:
terminal
vim ~/.bashrcRemove the line inside .bashrc that causes the problem, and source it again.
terminal
source ~/.bashrcCannot Execute Shell File Using ./
Considering modifying the Bash Shebang #!.
Instead of using the absolute path to the bash binary:
*.sh
#!/bin/bashUse the env utility:
*.sh
#!/usr/bin/env bash
Be First to Comment