def file_contains_pattern(file, pattern):
 if (not os.path.isfile(file)):
  raise NameError(('file %s does not exist' % file))
 cmd_result = utils.run(((('egrep -q "' + pattern) + '" ') + file), ignore_status=True, verbose=False)
 return (not cmd_result.exit_status)

def file_contains_pattern ( file , pattern ) : if ( not os . path . isfile ( file ) ) : raise NameError ( ( 'file %s does not exist' % file ) ) cmd_result = utils . run ( ( ( ( 'egrep -q "' + pattern ) + '" ' ) + file ) , ignore_status = True , verbose = False ) return ( not cmd_result . exit_status )
return true if file contains the specified egrep pattern .