This is a discussion on here-documents in ebuild within the Gentoo Linux Support forums, part of the Unix Operating Systems category; --> pk wrote: > That seems indeed a bug. In the environment, the function becomes Actually, it looks like a ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| pk wrote: > That seems indeed a bug. In the environment, the function becomes Actually, it looks like a bash issue. $ cat myfunc.txt #!/bin/bash myfunc () { grep aaa <<- EOF || echo "not found" bbb cc ddd EOF } $ source ./myfunc.txt $ export -f myfunc $ env [snip] myfunc=() { grep aaa <<-EOF bbb cc ddd EOF || echo "not found" } $ bash bash: myfunc: line 5: syntax error near unexpected token `||' bash: myfunc: line 5: ` || echo "not found"' bash: error importing function definition for `myfunc' $ |
| |||
| pk wrote: > pk wrote: > >> That seems indeed a bug. In the environment, the function becomes > > Actually, it looks like a bash issue. Yes. A similar problem has been reported last May: <http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/802616f21defd15e/841f90c44ccf917b?lnk=gst&q=export+here+doc#841f90c 44ccf917b> Regards... Michael |
| ||||
| Michael Mauch wrote: >> Actually, it looks like a bash issue. > > Yes. A similar problem has been reported last May: > > <http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/802616f21defd15e/841f90c44ccf917b?lnk=gst&q=export+here+doc#841f90c 44ccf917b> Ah well. Let's hope it will be fixed in some upcoming bash version, then... |
| Thread Tools | |
| Display Modes | |
|
|