开发者

perl + test perl syntax in my shell script (ksh)

I used the following syntax (part of ksh script) to verify if Validation word exist in LINE_FROM_FILE

    [[ "${LINE_FROM_FILE##*Validation}" != "${LINE_FROM_FILE}" ]] && print "match Validation"

the problem of this sytax that its also match word like Valid or ValidationVALID etc

and my target to开发者_StackOverflow中文版 match exactly the Validation word in the $LINE_FROM_FILE

I ask if its also possible to use perl syntax in my script to match exactly the Validation word

for example

   [[ ` some perl command ` = Validation  ]] && print "match Validation"

Lidia


yes. perl -e "insert; perl; code; here;"

e.g.: perl -e "print 'Validation'"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜