How to get the count of specific string for example "Failed" in a text file,E.G. /tibco/admin/bb.txt?
book
Article ID: KB0094584
calendar_today
Updated On:
Products
Versions
TIBCO Hawk
-
Not Applicable
-
Description
Resolution: You can use the following in script file: ================== #!/bin/csh cat /tibco/admin/bb.txt|awk '/Failed/'| awk '{print NR}' |tail -1 ===================== and use the method custom:executeForNumber()
The script file has been tested on Solaris,Linux,AIX.
Issue/Introduction
How to get the count of specific string for example "Failed" in a text file,E.G. /tibco/admin/bb.txt?