Editing the .bashrc, .bash_profile, .bash_login files incorrectly can permanently ban you from the system, making it difficult to login and rectify the mistake.
A very useful strategy in editing these files is:
su – “your_username”
# there might be an error
# rectify error
Here you can use rlogin, telnet or su command to login into your account, and then safely return to your own shell after a logout.