0

I have this command:

 on_named_pipe_msg(){

 }

 export -f on_named_pipe_msg

 cat "ql_named_pipe" | xargs on_named_pipe_msg &

but I get this error:

xargs: on_named_pipe_msg: No such file or directory

anyone know how I can call a bash function from the results of calling cat on a named pipe?

Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
  • 3
    `xargs` doesn't know about exported functions. Use a shell script instead of a function. – Jonathan Leffler Mar 04 '18 at 03:21
  • See [Pipe output to bash function](https://stackoverflow.com/questions/11454343/pipe-output-to-bash-function) for more information on bash functions and stdin. – Luis Guzman Mar 04 '18 at 04:51

0 Answers0