Skip to main content
deleted 19 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 29
  • 156
  • 240

This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said.

As the title says, whatWhat is the difference between piping command1 | command2 versus expanding commands command2 $(command1)? For example

vi $(find /home | grep xyzzy) 

spits results out to vi to edit whereas

find /home | grep xyzzy | vi 

doesn't seem to work for me. But I'm not understanding the fundamental difference.

Edit

Other relevant posts

Process substitution and pipe

Process substitution and pipe

This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said.

As the title says, what is the difference between piping command1 | command2 versus expanding commands command2 $(command1)? For example

vi $(find /home | grep xyzzy) 

spits results out to vi to edit whereas

find /home | grep xyzzy | vi 

doesn't seem to work for me. But I'm not understanding the fundamental difference.

Edit

Other relevant posts

Process substitution and pipe

Process substitution and pipe

This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said.

What is the difference between piping command1 | command2 versus expanding commands command2 $(command1)? For example

vi $(find /home | grep xyzzy) 

spits results out to vi to edit whereas

find /home | grep xyzzy | vi 

doesn't seem to work for me. But I'm not understanding the fundamental difference.

Edit

Other relevant posts

Process substitution and pipe

Process substitution and pipe

edited tags
Link
Jeff Schaller
  • 68.9k
  • 35
  • 122
  • 268
code blocks
Source Link
Sparhawk
  • 20.6k
  • 20
  • 97
  • 160

This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said.

As the title says, what is the difference between piping command1 | command2command1 | command2 versus expanding commands command2 $(command1)command2 $(command1)? For example

vi $(find /home | grep xyzzy)

vi $(find /home | grep xyzzy) 

spits results out to vi to edit whereas

find /home | grep xyzzy | vi

find /home | grep xyzzy | vi 

doesn't seem to work for me. But I'm not understanding the fundamental difference.

Edit

Other relevant posts

Process substitution and pipe

Process substitution and pipe

This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said.

As the title says, what is the difference between piping command1 | command2 versus expanding commands command2 $(command1)? For example

vi $(find /home | grep xyzzy)

spits results out to vi to edit whereas

find /home | grep xyzzy | vi

doesn't seem to work for me. But I'm not understanding the fundamental difference.

Edit

Other relevant posts

Process substitution and pipe

Process substitution and pipe

This link is relevant What's the difference between substitution and piping to bash but I am not quite understanding everything that is being said.

As the title says, what is the difference between piping command1 | command2 versus expanding commands command2 $(command1)? For example

vi $(find /home | grep xyzzy) 

spits results out to vi to edit whereas

find /home | grep xyzzy | vi 

doesn't seem to work for me. But I'm not understanding the fundamental difference.

Edit

Other relevant posts

Process substitution and pipe

Process substitution and pipe

Source Link
RhythmInk
  • 601
  • 3
  • 7
  • 14
Loading