Reputation: 133
I am trying to create regex dynamicly and then run it, this is part of script
...
param="egrep $2 $1"
shift
shift
while [ $# -ne 0 ]
do
param="$param""|egrep $1"
shift
done
$param // here i get error
...
But echo for $param seems to me ok
.P F1 a b c // run script
egrep a F1| egrep b| egrep c
What should I do in order to run $param correctly?
Upvotes: 0
Views: 825