LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: Odd error when re-invoking the shell (https://www.linuxquestions.org/questions/linux-newbie-8/bash-odd-error-when-re-invoking-the-shell-4175637472/)

L_Carver 08-30-2018 12:43 PM

bash: Odd error when re-invoking the shell
 
When I either source ~/.bash_aliases, source ~/.bashrc or re-invoke bash, I get this error:
Code:

bash: /home/carver/.bash_200710200753.00es: No such file or directory
What kind of file is this, and why would bash seek to load it when those dotfiles are sourced?

This has only happened twice in the last two hours, in other words: this weirdness is new today.

Hope someone can suggest a solution.

Carver

ondoho 08-30-2018 01:26 PM

obvious:
show us ~/.bash_aliases and ~/.bashrc

pan64 08-30-2018 01:59 PM

yes, it looks like there is an error either in ~/.bash_aliases or ~/.bashrc
and probably there is a file ~/.bash_2007.... something.

rtmistler 08-30-2018 02:16 PM

I would search for that string "bash_200710200753.00es", in your files. And then see if you can discern why it is in there in the first place.

MadeInGermany 08-31-2018 02:20 AM

Turn debugging on
Code:

set -x
source ...


L_Carver 09-04-2018 08:24 AM

Quote:

Originally Posted by ondoho (Post 5898098)
obvious:
show us ~/.bash_aliases and ~/.bashrc

Okay, I'll C&P them rather than attach them (and save everyone a bit of hassle). .bash_aliases first.
Quote:

function 1middle3 () {
echo "Don'y you mean '1middle2'? (y/n)"
read -e answer
if [[ "$answer" == "y" ]]; then
/home/steve/bin/1middle2
else
echo -e "Can't help you then.\nGood-bye.\n"
fi
}
alias 1middle3='1middle3'
alias mov='/bin/mv -v'
alias cp='cp --preserve=timestamp -LR -v'
alias copy='/bin/cp -LR -v'
alias mv='mv -v'
alias rm='rm -v'
alias mr='/bin/rm -v'
alias lst='ls --full-time -h'
alias touch='touch --no-create'
alias kdesu='kdesudo'
alias wherewasi='/bin/echo $OLDPWD'
alias back1='cd $OLDPWD'
alias eventitle='/home/steve/bin/1eventitle'
alias back1-2='cd ~-'
alias realias='source /home/steve/.bash_aliases'
alias quit='exit'
alias exiftool='exiftool -fast5 -P -overwrite_original_in_place'
alias rdjpgcomm='/usr/bin/rdjpgcom'
alias stripjpg='/usr/bin/jhead -purejpg'
alias 1size='/home/steve/bin/whatsize'
alias tool='exiftool'
alias fool='exiftool'
alias curl='/home/steve/bin/ccurl'
alias wget='/home/steve/bin/wwget'
alias whatsize='/bin/bash /home/steve/bin/whatsize'
alias pierreprint='exiftool -p /home/steve/bin/pierre.fmt'
alias gimmtdate='/home/steve/bin/gimmetdate'
alias psmac='exiv2 -bpa'
alias jpgcount='ls *.jpg | wc -l'
alias aria2='aria2c --remote-time=true'
alias a2='aria2'
alias 1locn='/home/steve/bin/1locate'
alias string='/home/steve/bin/stringdate'
alias 1qual='/home/steve/bin/1quality'
alias rethumb='/usr/bin/jhead -dt'
alias supertool='/usr/bin/exiftool -G -ALL:ALL'
alias 1res0='/home/steve/bin/1reso'
alias addheadline='/home/steve/bin/addheadlines'
alias ttouch='/usr/bin/touch -a -m -t'
alias tttouch='/usr/bin/touch -a -m -t'
alias strip1cap='/home/steve/bin/stripcap'
alias sed-i='sed -i'
alias xview='/usr/bin/gpicview &'
alias relisy='/home/steve/bin/relist'
alias mogrity='/usr/bin/mogrify'
alias srm='/usr/bin/srm -v'
function superdate () {
TDATE=$tdate
export TDATE
}
alias gericurl='/home/steve/bin/jericurl'
alias superdate='superdate'
#function autotouch () {
#set -xv
#if [[ -f dummy ]]; then rm dummy; fi
#if [ ! -z "$tdate" ]; then
#touch dummy
# touch -t "$tdate" dummy
# echo "The empty file, dummy, is now dated as follows"
# stat -c %y dummy
# touch -r "dummy" "$picc"
#fi
#[[ -f dummy ]]; rm dummy
#}
alias autotouch='/home/steve/bin/autotouch'
function relsit () {
echo "Don't you mean relist?"
read yn
if [[ $yn == "y" ]] || [[ $yn == "Y" ]]; then
/home/steve/bin/relist
else
echo "Sorry -- must'a misunderstood."
fi
}
function 3touch () {
echo "Don't you mean "3task""
read -e answer
if [[ "$answer" == "y" ]]; then
/home/steve/bin/3task $1

else
echo -e "Can't help you then.\nGood-bye.\n"
fi
}
alias 3touch='3touch'
alias etask='/home/steve/bin/3task'
alias xetask='/home/steve/bin/1hamster'
alias relsit=relsit
alias relust='/home/steve/bin/relist'
alias mohrify='/usr/bin/mogrify'
alias checkspell='/usr/bin/aspell -c'
alias wc-l='/usr/bin/wc -l'
alias setbaseq='/home/steve/bin/setgoalq'
alias listug='/usr/bin/apt list --upgradable'
now .bashrc.
Quote:

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
set -o noclobber
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=erasedups
# Turn on parallel history
shopt -s histappend
history -a
export HISTFILE=~/.bash_eternal_history
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u:\W\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
#case "$TERM" in
#xterm*|rxvt*)
# PS1='\u@\h: \W $ '
# ;;
#*)
# ;;
#esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
. ~/.bash_200710200753.00es
fi

export MARKPATH=$HOME/.marks
function jump {
cd -P "$MARKPATH/$1" 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$1"
}
function unmark {
rm -i "$MARKPATH/$1"
}
function marks {
ls -l "$MARKPATH" | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
}

export HISTFILESIZE=
export HISTSIZE=

# 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
export Text1="/home/steve/bin/Keywords"
export HISTTIMEFORMAT="%d/%m/%y %T "
PS1='\u@\h [\W]\$ '
Text1="/home/steve/bin/Keywords"

xset r rate 250 30

rtmister: how far up from /home/carver should I be looking for that as a string?

Carver

Guttorm 09-04-2018 08:52 AM

You only need to search this page for the string :)


Quote:

if [ -f ~/.bash_aliases ]; then
. ~/.bash_200710200753.00es
fi
This doesn't make sense. If you have a .bash_aliases file, source ~/.bash_200710200753.00es

L_Carver 09-13-2018 12:48 PM

Quote:

Originally Posted by Guttorm (Post 5899763)
You only need to search this page for the string :)




This doesn't make sense. If you have a .bash_aliases file, source ~/.bash_200710200753.00es

Not here on this page, nor available to source. I still get the error (posted above or
Code:

bash: /home/carver/.bash_200710200753.00es: No such file or directory
This is continuing to be annoying. Sourcing .bashrc, in which I've put an alias (realias) to source .bash_aliases seems to clear it up a bit, but on any new tab or window (Konsole or any other working terminal emu), bash starts as described in my original post.

I have interactive set somewhere (.profile?). If I took that away or commented it out, might this error disappear?

Carver

MadeInGermany 09-13-2018 01:06 PM

Run the following command, that will fix your ~/.bashrc file:
Code:

sed -i '/.bash_aliases/{N;s/.bash_200710200753.00es/.bash_aliases/;}' ~/.bashrc

L_Carver 09-13-2018 04:39 PM

Quote:

Originally Posted by MadeInGermany (Post 5902990)
Run the following command, that will fix your ~/.bashrc file:
Code:

sed -i '/.bash_aliases/{N;s/.bash_200710200753.00es/.bash_aliases/;}' ~/.bashrc

And you recommend I restart Konsole or some other terminal app to test it?

I'll be doing so before you can answer. I'll add to this thread if I encounter any problems.

Carver.

L_Carver 09-22-2018 07:06 AM

Quote:

Originally Posted by MadeInGermany (Post 5902990)
Run the following command, that will fix your ~/.bashrc file:
Code:

sed -i '/.bash_aliases/{N;s/.bash_200710200753.00es/.bash_aliases/;}' ~/.bashrc

And it did. TYVM.

Carver


All times are GMT -5. The time now is 06:33 AM.