Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.gentoo    |    Stupid OS you gotta compile EVERYTHING    |    17,684 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 16,262 of 17,684    |
|    pk to All    |
|    Re: here-documents in ebuild    |
|    14 Apr 08 09:49:26    |
   
   From: pk@pk.invalid   
      
   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'   
   $   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca