Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3096

How does one work with the data variable returned from a readdata call?

    XMLWordPrintable

    Details

    • Type: Knowledge acquisition
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: 3.7.8, 3.10.6, 3.14.0, 3.12.2
    • Fix Version/s: 3.12.3, 3.15.0
    • Component/s: Documentation
    • Labels:
      None

      Description

      so given

      Unknown macro: { "KEY1"}

      as file content i use readdata and have a data var but i want KEY1 and KEY2 as variables.

      "string" string => format("%S", data);
      gives me the whole string

      There should be a simple example showing how to reference values inside a data container in the Language Reference -> Variables section of the reference manual.

        Attachments

          Activity

            People

            • Assignee:
              a10042 Nick Anderson
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel