Search code examples
clearcase

New line in clear case format string


So I want to display the versions of an activity: In the fmt_ccase I found the following format string:

%[versions]QCp

This returns me the quoted and comma separated version string. But I want then to be split by a newline. I tried the following:

cleartool lsact -fmt "%[versions]\np" my_act@\test_pvob

And:

cleartool lsact -fmt "%[versions]p\n" my_act@\test_pvob

Both did not work. Obviously I could achieve this using Powershell:

cleartool lsact -fmt "%[versions]p" my_act@\test_pvob).Split(" ")

But I want to now whether there is a ClearCase way to do this ?


Solution

  • The fmt_case documentation only references [p]Q, or [p]C as separators (quotes, comma), with newlines being '\n'.

    If it does not work, you would have to so it by script, either Powershell as you mention, or using a bat script to process the output.

    The \n newline syntax applies to each returned value, and in the case of %[version]p, there is only one returned value: the all list of versions (space-separated).
    So no newline between each versions.