Read a property from with a bash script

#!/usr/bin/env bash

function getProperty {
    PROP_VALUE=`cat $GRADLE_PROPERTIES_FILE | grep "$PROP_KEY" | cut -d'=' -f2`
    echo $PROP_VALUE
GRAILS_VERSION=$(getProperty "grailsVersion")

Do you like to read about Grails / Geb / Groovy development? If the answer is yes, subscribe to Groovy Calamari. A weekly curated email newsletter about the Groovy ecosystem. Curated by me 🎉

Leave a Reply

Your email address will not be published. Required fields are marked *