Wednesday 15 April 2015

bash - how to combine 2 grep checks in a while loop -


What I'm trying to do by default:

  while string1 exists Echo is present in Foo.log or in string 2 foo.log. Examples of input files:  

It should be kept while running

  string1 foo bar string2   
  foo bar < / Code>  

This time should be stopped

  Foo bar string1  
= "post-text" itemprop = "text">

"String1 is not present in foo.log or exists in string 2" in foo.log "

  while! Grep -q "string1" foo.log || Grep -q "string2" foo.log; Echo done    

No comments:

Post a Comment