Why any command in .bashrc is being executed twice
This is my .bashrc file. Now as in the attached screenshot, it seems that the echo "Hello World" is being executed twice.
Could anybody please help me understand this? My emulator is LXTerminal. # Add nano as default editor export EDITOR=nano alias ls='ls --color=auto' #If not running interactively, don't do anything [[ $- != *i* ]] && return PS1='[\u@\h: \W]\$ ' echo "Hello World" |
Can you check your .bash_profile; its normally called from there.
|
Can you once share, what you see on terminal after you login i.e. enter in your session?
Also the same could be there in .profile file as well. Since shell executes .bashrc as well .profile or .login etc. Code:
~$ grep 'Hello' .profile .login |
Thank you very much for your reply. I see this when open LXTerminal:
Hello World Hello World [sakibccr@cdc: ~]$ And the grep output is this: grep: .profile: No such file or directory grep: .login: No such file or directory I checked in the file manager, there is no .profile or .login file. My distro is Archbang with Openbox WM and SpaxeFM file manager. |
Quote:
2nd: Is that the entire .bashrc file contents? It seems a bit "short". |
Thank you very much @Habitual. I was using Ubuntu as my primary OS for quite some time, but could not gather much knowledge though.
Yes it is the entire .bashrc file. |
Quote:
You are in the right place to learn stuff. :) Welcome to LQ. I can't answer your question directly as to what may be the issue, I just ask the obvious more often than not. Have you tried removing the 'echo "Hello World"' from .bashrc to see if the issue persists? There is another option to create a new .bashrc from a skeleton file, but I am not clear on those instructions. Please be patient, someone much smarter than I will be along to help. Have a Great Day! |
Quote:
Code:
~$ grep 'Hello' .bashrc |
All times are GMT -5. The time now is 02:59 AM. |