0

I enter two command in bash:

  1. $export g='grep "something"'
  2. $echo "something and another thing" | $g

But it doesn't work.

I want the second command to be evaluated by bash as : echo "something and another thing" | grep "something"

What should I do for that?

rimalroshan
  • 139
  • 6

1 Answers1

1

use an alias.

alias g='grep "something"'
echo "something and another thing" | g
Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79