(imported topic written by SystemAdmin)
I want to return the line: communication.managerid_1=ESP_PROD Specifically if it begins with communication.managerid AND containd ESP_PROD. The_1 could be another number or the line could be commented with a #, in that case would be false.
I tried to check existance using someting like this, but failed
exists line (starting with “communication.managerid”) and (whose (it contains “ESP_PROD”)) of file “/opt/dseries/WA/agentparm.txt”
The following works, but would not be correct if ESP_PRD was on a line beginning with a #communication.managerid
as the example does not compare both to a single line of the file
Q: exists line starting with “communication.managerid” of file “/opt/dseries/WA/agentparm.txt” and exists line whose (it contains “ESP_PROD”) of file “/opt/dseries/WA/agentparm.txt”
A: True
Sample file:
A: communication.managerid_1=ESP_PROD
A: communication.manageraddress_1=161.222.3.127
A: communication.managerport_1=7507
A: communication.monitorobject_1=UXPRD215/AGENTMON1.0/MAIN
A:
A: #communication.managerid_2=
A: #communication.manageraddress_2=
A: #communication.managerport_2=
A: #communication.monitorobject_2=UXPRD215/AGENTMON2.0/MAIN