It seems that when piping into bash, variables have different
'retention' than functions:

r=23; echo $r; echo -e "r=bc\necho $r" |bash
23
23

r(){ echo Hey;}; r; echo -e "r(){ echo Ho;}\nr" |bash
Hey
Ho

Is this a bug, or is there a rationale?
Thanks,
Peter

Reply via email to