Hello, zeisberger@io:~$ VN=$(nonexistentcmd) || echo lala bash: nonexistentcmd: command not found lala uzeisberger@io:~$ VN=$(nonexistentcmd | sed 's/-/./g') || echo lala bash: nonexistentcmd: command not found The reason is (from bash(1)): The return status of a pipeline is the exit status of the last command, unless the pipefail option is enabled. and the sed command is fine. pipefail is not portable, i.e. Solaris' sh doesn't support it. I'd suggest: if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then VN=$(echo "$VN" | sed 's/-/./g'); else VN=$(cat version) || VN="$DEF_VER"; fi This works with Solaris' sh and bash. Best regards Uwe -- Uwe Zeisberger exit vi, lesson V: o : q ! CTRL-V <CR> <Esc> " d d d @ d - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Fri Jan 27 00:45:58 2006
This archive was generated by hypermail 2.1.8 : 2006-01-27 00:46:07 EST