Re: Dashhh

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

 



Am 17.11.11 21:11, schrieb Stephane CHAZELAS:
2011-11-17, 17:17(+01), Heiko Gerstung:
[...]
1. The usual "[[" and "==" stuff (pretty easy to change, thank you sed)
2. shift returns with a critical error when no arguments are left (no really good solution found)
[ "$#" -eq 0 ] || shift

3. $[] arithmetic stuff not working (OK, worked around that with bc)
$((...))

4. The bash FUNCNAME variable was very valuable for debugging purposes and is nonexistent in dash

If your functions are written as

f() {
   ...
}

sed 's/^[[:blank:]]*\([^[:blank:]]*\)[[:blank:]]*()[[:blank:]]*{/&  local FUNCNAME=\1;/'

Thanks for your helpful comments, in fact I did something like this before I added the FUNCNAME patch to my dash sourcetree. I still prefer the FUNCNAME implementation as provided by my patch, but it is certainly possible to work around that as proposed by you.

Regards,
 Heiko

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux