In order to record date and time for each command in history I set
And in order for this setting to remain after I log out or close the terminal I added to the .bashrc
echo "HISTTIMEFORMAT="%d/%m/%y %T"" >> .bashrc
I tested and it shows the time for commands in history,for those I used after I wrote the 2 commands above.Problem is after I open the terminal it gives me a message saying:
bash:fg:no job control HISTTIMEFORMAT = "%d/%m/%y %T" bash:fg:no job control HISTTIMEFORMAT = "%d/%m/%y %T" bash:fg:no job control
I checked the history and it doesn't show me the date for the past commands anymore as it was supposed to do after I added to the bashrc file. I repeated the commands for the time format and each time it doesn't save and I think the more I add the command to the bashrc file the more that message is being expanded with that no job control thing.
Is there any way to fix this/reset the format? There is no whitespace around = and each time I insert that var to the file the more statements of no job control shows after I open the terminal even though it shows time during the session.It's like the var gets broken when exiting.
The end of the bashrc file is this:
# enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi HISTTIMEFORMAT=%d/%m/%y %T