Formatting Strings
A formatting string is a string that contains field references; it is used to list the elements of a set.
- The syntax for a field reference: @field@ or @field:size@.
- The size can be used to format tables and reports.
Field Reference
% vovset show -O "@id@ @status@" System:jobs
% vovset show -O "@ID@ @STATUS@" System:jobs
% vovset show -O "@Id@ @S_t_A_t_U_s_@" System:jobs
Size Specification
- If the field value is shorter than the specified size, the value is padded to the right with spaces in order to reach the desired size.
- If the size is negative, the width of the formatted field is the absolute value of the size and the field is right-justified.
- If the size is positive, the field is left-justified.
- If the size is zero, the field is not truncated.
- If the field value is shorter than the specified size, the value is padded to the right with spaces in order to reach the desired size.
- If the size is negative, the width of the formatted field is the absolute value of the size and the field is right-justified.
- If the size is positive, the field is left-justified.
- If the size is zero, the field is not truncated.
- If the absolute value of the size cannot exceed 1000.
- If the absolute value of the size cannot exceed 1000.
- Any character between the size specification and the second @ sign is silently dropped.
Each field reference is replaced by the corresponding value of the field for each node. If the field is incompatible for a node (for example, if a job node does not have a NAME field) the reference is replaced with the empty string.
% vovset show -O "id=@ID@ (@STATUS@)" System:jobs
id=001234567 (VALID)
% vovset show -O "id=@ID@ (@STATUS:12@)" System:jobs
id=001234567 (VALID )
% vovset show -O "id=@ID@ (@STATUS:-12@)" System:jobs
id=001234567 ( VALID)
% vovset show -O "id=@ID@ (@STATUS:-12extra_chars_that_are_dropped@)" System:jobs
id=001234567 ( VALID)