In order to get the values of a few static attributes for a given set of ADOs on the command line or as part
of a shell script you can use get_attributes
.
In its most common form, you pass in ADO IDs on STDIN and call get_attributes with:
- - to indicate that ADOs are to be read from STDIN
- 0 to denote the batch size
- one ore more attribute IDs separated by spaces
Here is an example for a single ADO and a single attribute:
acdba@acbox:~$ echo C0.ISS.1 | get_attributes - 0 C0_SRC01
C0_SRC01
N0.BB.00-2143,C0.ISS.1
acdba@acbox:~$
And here is one for with more ADOs and attributes:
acdba@acbox:~$ echo -e "C0.ISS.1\nC0.ISS.2" | get_attributes - 0 C0_SRC01 C0_SRC04
C0_SRC01,C0_SRC04
N0.BB.00-2143,I,C0.ISS.1
N0.BB.00-2145,I,C0.ISS.2
acdba@acbox:~$
You can see that the first line returned lists the attributes. Every following line contains the respective attribute values followed by the ADO ID. By default, a value of $NA would be displayed as ?.