2014-09-25 6:23 GMT+02:00 Linda Walsh <b...@tlinx.org>:
>
> Maybe exporting fun?
>
>   export fun='() { :;}'
>>  bash -c 'declare -pf fun'
>>
> bash: line 0: declare: fun: not found
> ...
> I've never seen functions created with an assignment.  Is this a
> new syntax in 4.3?
>
> (still in 4.2.43 here)...


Bash has had this feature since "forever"

$ fun='() { echo "$BASH_VERSION";}' bash1 -c fun
1.14.7(1)

Your bash 4.2.43 is no exception, but the way declare's -p and -f
options interact did change in 4.3, so try with just ''declare -f fun''
instead

-- 
Geir Hauge

Reply via email to