Friday, 17 July 2020

reading-property-from-file.sh

This worked for me on all *nix platform:
PROP_VALUE=cat $PROPERTY_FILE | grep "$PROP_KEY" | cut -d'=' -f2

No comments:

Post a Comment

How to check if a file contains a specific string using Bash

 In case if you want to check whether file does not contain a specific string, you can do it as follows. if ! grep -q SomeString "$File...