title: How do I get bash to export a function for use in a pipe with sem?
body: <pre><code>file=/tmp/log
  export file
  
  addurls() {
    { while URL= read -r url; do echo $url; echo $url &gt;&gt; $file; done }
  }
  export -f addurls
  
  techmeme() {
    xidel -s $feed --extract '//description' | ack '^&lt;A HREF' | awk -F\&quot; '{ print $2 }' \
      | addurls
  }
  
  export -f techmeme
  
  feeds=(
    'https://www.techmeme.com/feed.xml'
    'https://www.memeorandum.com/feed.xml'
    'https://mediagazer.com/feed.xml'
  )
  
  for feed in $feeds; do
    #techmeme
    sem -j 1 &quot;techmeme&quot;
  done;
  sem --wait
  </code></pre>
  <p>I'm trying to use <code>sem</code> to do things in parallel but I can't pipe it seems</p>