https://bugzilla.novell.com/show_bug.cgi?id=300678#c27
--- Comment #27 from Dr. Werner Fink 2007-10-02 07:11:54 MST ---
AFAICS your sed command does split even on \: and not only on :
and a small modification of the uniquefy_search_path shell function
should do both, help by spaces and escaped colons, the last one by
simply handling the `\' and the string after the colone as an own
part but this results in the correct string `\:...'.
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
}
uniquefy_search_path b:a:c:a
uniquefy_search_path a:b:a:c
uniquefy_search_path ' a: b: a:c:a '
uniquefy_search_path ' a: b: a:\:c:a :\:c'
this seems to work for ksh, bash, sh (bash in POSIX mode), and ash.
--
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.