Skip to main content
added 270 characters in body
Source Link
Eduardo Trápani
  • 14.2k
  • 1
  • 21
  • 38

You can substitute like this:

$ SEARCH='*mp4' $ find / -name "$(echo $SEARCH)" 

This will pipe the output of the command into a variable and do things like this:

$ find / -name "$(grep XYZ | cut -f2)" 

You can see more about Command Substitution.

You can substitute like this:

$ SEARCH='*mp4' $ find / -name "$(echo $SEARCH)" 

You can substitute like this:

$ SEARCH='*mp4' $ find / -name "$(echo $SEARCH)" 

This will pipe the output of the command into a variable and do things like this:

$ find / -name "$(grep XYZ | cut -f2)" 

You can see more about Command Substitution.

Source Link
Eduardo Trápani
  • 14.2k
  • 1
  • 21
  • 38

You can substitute like this:

$ SEARCH='*mp4' $ find / -name "$(echo $SEARCH)"