Q:

Why the pipe command can not work

firefox $(grep -l "mysed" /home/test)  

the command can open all my file which contain the word  mysed  in firefox,when i change the command into the following,
grep -l "mysed" /home/test |  firefox 

why the firefox can not open the files selected by grep?

A:

Because a pipe doesn't apply parameters. A pipe redirects stdout from one process to stdin of another.
You can use xargs to achieve what you want:
grep -l "mysed" /home/test | xargs firefox 

