bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable passed to system contains garbage characters


From: Patrick Nagelschmidt
Subject: Re: Variable passed to system contains garbage characters
Date: Mon, 17 Dec 2007 20:29:10 +0100

At 17.12.2007, Chet Ramey wrote:
I can't reproduce this on fedora core 6, which is the closest Linux
box.  I suspect this is prompt string or PROMPT_COMMAND related, so a
transcript of running this script with `bash -x' would help.

No problem:

$ bash -x "./test.sh"
+ alias 'scr=screen -R '
+ '[' -f /etc/bashrc ']'
+ . /etc/bashrc
++ '[' 508 -gt 99 ']'
+++ id -gn
+++ id -un
++ '[' donkey = donkey ']'
++ umask 002
++ '[' '' ']'
++ shopt -q login_shell
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/colorls.sh ']'
++ . /etc/profile.d/colorls.sh
+++ alias 'll=ls -l'
+++ alias 'l.=ls -d .*'
+++ COLORS=/etc/DIR_COLORS
+++ '[' -e /etc/DIR_COLORS.xterm ']'
+++ COLORS=/etc/DIR_COLORS.xterm
+++ '[' -e /home/donkey/.dircolors ']'
+++ '[' -e /home/donkey/.dircolors.xterm ']'
+++ '[' -e /home/donkey/.dir_colors ']'
+++ '[' -e /home/donkey/.dir_colors.xterm ']'
+++ '[' -e /etc/DIR_COLORS.xterm ']'
++++ dircolors --sh /etc/DIR_COLORS.xterm
+++ eval 'LS_COLORS='\''no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'\'';' export LS_COLORS ++++ LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:'
++++ export LS_COLORS
+++ '[' -z 'no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:' ']'
+++ egrep -qi '^COLOR.*none' /etc/DIR_COLORS.xterm
+++ alias 'll=ls -l --color=tty'
+++ alias 'l.=ls -d .* --color=tty'
+++ alias 'ls=ls --color=tty'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/cvs.sh ']'
++ . /etc/profile.d/cvs.sh
+++ export CVS_RSH=ssh
+++ CVS_RSH=ssh
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/glib2.sh ']'
++ . /etc/profile.d/glib2.sh
+++ export G_BROKEN_FILENAMES=1
+++ G_BROKEN_FILENAMES=1
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/krb5-devel.sh ']'
++ . /etc/profile.d/krb5-devel.sh
+++ echo /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/donkey/bin
+++ /bin/grep -q /usr/kerberos/bin
+++ echo /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/donkey/bin
+++ /bin/grep -q /usr/kerberos/sbin
++++ /usr/bin/id -u
+++ '[' 508 = 0 ']'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/lang.sh ']'
++ . /etc/profile.d/lang.sh
+++ sourced=0
+++ '[' -n en_US ']'
+++ sourced=1
+++ '[' -n '' ']'
+++ '[' 1 = 1 ']'
+++ '[' -n en_US ']'
+++ export LANG
+++ '[' -n '' ']'
+++ unset LC_ADDRESS
+++ '[' -n '' ']'
+++ unset LC_CTYPE
+++ '[' -n '' ']'
+++ unset LC_COLLATE
+++ '[' -n '' ']'
+++ unset LC_IDENTIFICATION
+++ '[' -n '' ']'
+++ unset LC_MEASUREMENT
+++ '[' -n '' ']'
+++ unset LC_MESSAGES
+++ '[' -n '' ']'
+++ unset LC_MONETARY
+++ '[' -n '' ']'
+++ unset LC_NAME
+++ '[' -n '' ']'
+++ unset LC_NUMERIC
+++ '[' -n '' ']'
+++ unset LC_PAPER
+++ '[' -n '' ']'
+++ unset LC_TELEPHONE
+++ '[' -n '' ']'
+++ unset LC_TIME
+++ '[' -n '' ']'
+++ unset LC_ALL
+++ '[' -n '' ']'
+++ unset LANGUAGE
+++ '[' -n '' ']'
+++ unset LINGUAS
+++ '[' -n '' ']'
+++ unset _XKB_CHARSET
++++ /sbin/consoletype
+++ consoletype=pty
+++ '[' -n '' ']'
+++ '[' -n '' ']'
+++ '[' -n en_US ']'
+++ case $LANG in
+++ '[' xterm = linux ']'
+++ unset SYSFONTACM SYSFONT
+++ unset sourced
+++ unset langfile
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/less.sh ']'
++ . /etc/profile.d/less.sh
+++ '[' -x /usr/bin/lesspipe.sh ']'
+++ export 'LESSOPEN=|/usr/bin/lesspipe.sh %s'
+++ LESSOPEN='|/usr/bin/lesspipe.sh %s'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/mc.sh ']'
++ . /etc/profile.d/mc.sh
+++ alias 'mc=. /usr/share/mc/bin/mc-wrapper.sh'
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/vim.sh ']'
++ . /etc/profile.d/vim.sh
+++ '[' -n '3.2.33(1)-release' -o -n '' -o -n '' ']'
+++ '[' -x //usr/bin/id ']'
++++ //usr/bin/id -u
+++ '[' 508 -le 100 ']'
+++ alias vi
+++ alias vi=vim
++ for i in '/etc/profile.d/*.sh'
++ '[' -r /etc/profile.d/which-2.sh ']'
++ . /etc/profile.d/which-2.sh
+++ alias 'which=alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
++ unset i
++ unset pathmunge
+ let STEP=86400
++ date +%s
+ let CALCTIME=1197919330
++ echo '1197919330 - (1197919330 % 86400) - 86400'
++ bc -i
++ tail -1
+ export 'DAYSTART=1197763200'
+ DAYSTART='1197763200'
+ echo '1197763200'
1197763200
++ date -d '1970-01-01 1197763200 sec' '+%Y-%m-%d %T'
date: invalid date `1970-01-01 \033[?1034h1197763200 sec'
+ export BASHBUG=
+ BASHBUG=


In FC6 it worked fine for me as well :)
In fact it did so for two years, but somewhere between late fedora 7 and early fedora 8 it suddenly stopped.


Br,
Patrick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]