• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Frits Walraven
  • Himai Minh

Groovy config.contains

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I am trying to write a groovy script to be able to check a block of config exists.  Currently, when running this command it is looking for config line1-5 anywhere in the config list.  I am more interested in creating a script that will look at the config.contains in order from 1-5.  Example below!


if (config.contains(
   "config line 1"
   ) && config.contains(
   "config line 2"
   ) && config.contains(
   "config line 3"
   ) && config.contains(
   "config line 4"
   ) && config.contains(
   "config line 5"
return 1;
else {
return 0;
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic