Hi help-cfengine,

Running community 3.0.3.

Given a string, is there a way to address the characters in the string?

splitstring() seems to work fine as long as there is a delimiter, e.g.

vars:
        "words"  slist => splitstring("foo:bar:baz", ":", 3);


But it doesn't seem to function quite analogously to Perl/Python's
split.  For example,

vars:
        "chars" slist => splitstring("word", "", 4);


doesn't return an error, but the "chars" slist doesn't seem to be
defined, either.  Using "." and "[.]" as regexps doesn't do it, either.

Am I barking up the wrong tree?

The reason for this is that we have "hashed" home directories to create
- e.g. homedirs for joe and frank are:

 /users/j/o/joe
 /users/f/r/frank

Hope you can give me some pointers.

Regards,
Jim

--
Jim Lawson
Systems Architecture & Administration
Enterprise Technology Services
University of Vermont
Burlington, VT USA


_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to