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?

rooni
  • 139
  • 7

1 Answers1

1

use an alias.

alias g='grep "something"'
echo "something and another thing" | g
Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89