0

in a file how could I select line where there is :

Value_1 and Name_species

I should get for instance:

Value_1:(O)_content_:Name_species 

I tried

grep "Value_1:*:Name_species" file 

but it does not work...

chippycentra
  • 869
  • 1
  • 4
  • 15

2 Answers2

1

The simpliest way to combine two greps is by grepping the one after the other:

grep "Value_1" <filename> | grep "Name_species"
Dominique
  • 13,061
  • 14
  • 45
  • 83
1

alternative

grep -E "Value_1:.*:Name_species" <filename>
UtLox
  • 3,246
  • 2
  • 8
  • 12