Skip to content

Instantly share code, notes, and snippets.

@r-lindner
Created Sep 24, 2015
Embed
What would you like to do?
# cf-agent -Kf ./test_split.cf
# R: 1 not working: ${test1}
# R: 2 works: $_{var}
# R: 2 works: line2
# R: 2 works: line3
body common control {
bundlesequence => {
"test"
};
}
bundle agent test {
vars:
"test1" slist => string_split("${var}:line2:line3", ":", "150");
"test2" slist => string_split("$_{var}:line2:line3", ":", "150");
reports:
"1 not working: ${test1}";
"2 works: ${test2}";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment