https://bugzilla.novell.com/show_bug.cgi?id=300678#c22
Dr. Werner Fink changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |werner@novell.com
Status|NEEDINFO |ASSIGNED
Info Provider|werner@novell.com |
--- Comment #22 from Dr. Werner Fink 2007-09-25 03:58:39 MST ---
Such a sorting has to work even for ksh, ash, bash, and sh (bash in POSIX mode)
that means that `declare -a' is not correct. The ksh has its own typeset
builtin
similar to that of the bash but ash does not have such a builtin. Beside this
an
application which crash on a double within a environment variable is simply
broken and has to be fixed ;)
Maybe something like the following will work with ksh, ash, bash, and sh:
uniquefy_search_path ()
{
OIFS="$IFS"
IFS=:
set -- $@
IFS="$OIFS"
_y=""
for _x ; do
case "$_y" in
*:${_x}:*) continue
esac
_y=${_y:+"$_y:"}${_x}
done
echo $_y
unset _y _x
}
no sed, no sub shell, no array.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.