Serial of hardware on AIX

why does 'serial of hardware' work but when I do ‘(serial of hardware | uuid of system_information of dmi as string)’ (with the goal to pipe to a dmi call if it errors) it is performing the send evaluation?? I thought pipe was an error redirection if the first evaluation errored?

Q: (serial of hardware as string | uuid of system_information of dmi as string)
E: Error: The operator "dmi" is not defined.
T: 10.000 ms



 Q: operating system
 A: AIX 7.1
 T: 8.000 ms

Q: version of client
A: 10.0.2.52
T: 7.000 ms

Q: serial of hardware
A: 06E9B0P
T: 7.000 ms

That is the normal handling for the pipe operator, but that only handles evaluation errors and this is considered a syntax error because the ‘dmi’ property doesn’t exist in that client version.

You should be able to get around that by testing for the operator, changing the right side of the pipe like

| If exists property "dmi" then uuid of system_information of dmi as string else "no inspector"
2 Likes

ah, didn’t know the | < code> had to be free of syntax errors even if it doesn’t evaluate it.
thanks