(imported topic written by SystemAdmin)
I have a file containing the following lines:
root # cat /tmp/mojo.out
=============================================================================
Hostname : CBCibmadmin Status : active
Type : prod MaintMode : NO
Console : ibmhmc4,ibmhmc6 SNI Tag : p520-02
OS Vendor : ibm
Location : cbc Rack : L-08
Model : 9111-520 BkupDay : no
Serial : 100411e SHAMU Menu : N
Function : admin Class : infrastructure
Qrel : Planning :
Description
UNIX Team Admin Server
Notes
I want to create a task to grab the line containing “Function : admin” and return the value “admin” placing into a parameter named “FUNCTION”, then use an if statement to set a custom field named “Quest” to a value of “True”. Is the following correct???
parameter “FUNCTION” = "{(tuple string item 3 of concatenation “, " of substrings separated by " " of line whose ( it contains “Function” ) of file “/tmp/mojo.out”)}”
if {(parameter “FUNCTION”) = “admin”}
setting “Quest”=“True” on {now} for client
endif