--- Begin Message ---
Subject: |
Re: bash segfaults processing a certain .bashrc file on AMD 64-bit machine |
Date: |
Wed, 17 Nov 2004 15:50:46 +0000 |
> That was mine. I don't know if it will help, but you could try this
> version:
>
> function cleanpath {
> local var="${1:-PATH}" oldpath newpath=: entry
> oldpath="${!var}:"
> while [ -n "$oldpath" ]; do
> entry="${oldpath%%:*}"
> oldpath="${oldpath#*:}"
> case "$entry" in /*)
> case "$newpath" in
> *:"$entry":*) ;;
> *) [ -d "$entry" ] && newpath="$newpath$entry:";;
> esac;;
> esac
> done
> newpath="${newpath#:}"
> eval "$var"'="${newpath%:}"'
> }
I've tried this (see the attached .bashrc) but it still segfaults. Surely one
should get an error message and not a segfault in any case..?
> > export
> > PATH=/home/stieltjes/rodgers/bin:/home/stieltjes/.rodgers-pub/bin:/home/stieltjes/.rodgers-pub/bin/wineexecbin/bin:$P\ATH;
>
> Is that backslash really there? It will probably not do what you
> want, although it shouldn't cause a segfault.
No, it isn't (presumably it was added when I cut-and-pasted from my
terminal).
Thanks getting back to me so quickly,
Chris.
.bashrc
Description: Text document
--- End Message ---