Re:A nice, little known C feature: Static array indices in p...
by nitrogen on Tuesday February 19, 2013 @09:09AM
(#5244310)
User-defined functions basically eliminate this (may not be POSIX compliant, but supported in all shells I know of),
User-defined functions are part of POSIX, but the function keyword is not. This bit me when I was porting a script from bash to dash (worth the effort on slower devices, as dash is significantly faster loading).
On bash you could do something like this:
function foo()
{
echo "Foo"
}
In POSIX shell (and, thus, also bash) you do this:
User-defined functions are part of POSIX, but the function keyword is not. This bit me when I was porting a script from bash to dash (worth the effort on slower devices, as dash is significantly faster loading).
On bash you could do something like this:
In POSIX shell (and, thus, also bash) you do this: Reference: https://wiki.ubuntu.com/DashAsBinSh#function