I used the following syntax as part of a ksh script to verify if the word Validation
exists in LINE_FROM_FILE
.
[[ "${LINE_FROM_FILE##*Validation}" != "${LINE_FROM_FILE}" ]] && print "match Validation"
The problem of this syntax is that it is also matching words like Valid
or ValidationVALID
etc. and my goal is to exactly match the word Validation
in the variable $LINE_FROM_FILE
.
I ask if it is also possible to use Perl syntax in my script to exactly match the word Validation
, for example:
[[ ` some perl command ` = Validation ]] && print "match Validation"