-bash: [: too many arguments
L. Adrian Griffis
adrian at nerds.org
Thu Oct 9 02:27:56 CDT 2003
Looks like it's probably not the ".bashrc" file. I recommend
making your own copy of "/etc/bashrc" called something like
"etcbashrc" in your home directory. Try to see if you can
get the same error message by executing the command:
bash etcbashrc
If you can, then try:
bash -x etcbashrc
The "-x" option should make it print each command just before
it is executed. The cut and paste about 15 lines centered
around the error message into an email to the list.
Adrian
On Wed, 8 Oct 2003, Michael Pratt wrote:
> Its not really effecting anything but it is annoying.
>
> -------------------------------------------
>
> # .bashrc
>
> # User specific aliases and functions
>
> alias rm='rm -i'
> alias cp='cp -i'
> alias mv='mv -i'
>
> # Source global definitions
> if [ -f /etc/bashrc ]; then
> . /etc/bashrc
> fi
>
>
> -------------------------------------------------
>
>
> # /etc/bashrc
>
> # System wide functions and aliases
> # Environment stuff goes in /etc/profile
>
> # by default, we want this to get set.
> # Even for non-interactive, non-login shells.
> if [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]; then
> umask 002
> else
> umask 022
> fi
>
> # are we an interactive shell?
> if [ "$PS1" ]; then
> if [ -x /usr/bin/tput ]; then
> if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
> stty erase `tput kbs`
> elif [ -x /usr/bin/wc ]; then
> if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal
> stty erase `tput kbs`
> fi
> fi
> fi
> case $TERM in
> xterm*)
> if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
> PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
> else
> PROMPT_COMMAND='echo -ne "033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}007"'
> fi
> ;;
> screen)
> if [ -e /etc/sysconfig/bash-prompt-screen ]; then
> PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
> else
> PROMPT_COMMAND='echo -ne "033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}033\"'
> fi
> ;;
> *)
> [ -e /etc/sysconfig/bash-prompt-default ] &&
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
> ;;
> esac
> # Turn on checkwinsize
> shopt -s checkwinsize
> [ "$PS1" = "\s-\v\$ " ] && PS1="[u at h W]\$ "
>
> if [ "x$SHLVL" != "x1" ]; then # We're not a login shell
> for i in /etc/profile.d/*.sh; do
> if [ -r "$i" ]; then
> . $i
> fi
> done
> fi
> fi
> # vim:ts=4:sw=4
>
> -----------------------------------------------------------------------------
>
> -----Original Message-----
> From: owner-kclug at marauder.illiana.net [mailto:owner-kclug at marauder.illiana.net] On Behalf Of
Jonathan Hutchins
> Sent: Tuesday, October 07, 2003 3:29 PM
> To: kclug at kclug.org
> Subject: Re: -bash: [: too many arguments
>
> On Tuesday 07 October 2003 3:00 pm, Michael Pratt wrote:
>
> > Does anyone know how I can clean this up? It happens when I first login
> > twice.
>
> > -bash: [: too many arguments
>
> Please post the contents of ~/.bashrc and /etc/bashrc.
>
>
>
>
>
>
More information about the Kclug
mailing list