Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript forum!
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Groovy config.contains

 
Greenhorn
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!

Thanks!


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;
}[/color]
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic