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
  • 3
  • 13

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
  • 8,687
  • 9
  • 28
  • 67
1

alternative

grep -E "Value_1:.*:Name_species" <filename>
UtLox
  • 2,885
  • 2
  • 6
  • 10