在ClearCase中用空格标记文件 [英] Labelling files with spaces in ClearCase

查看:84
本文介绍了在ClearCase中用空格标记文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个脚本来递归标记文件。这是执行标签命令的命令。

We have a script that labels files recursively. Here is the command that executes the label command.

cleartool ls -recurse -vob_only -visible -short | \
    xargs cleartool mklabel -replace -follow VPCEUM_9.0.0.99 > label.txt 2>&1

当遇到带有空格的文件时,例如 / directory / d1 /我的文件在此处。doc,命令错误。

When is encounter files with spaces the name such as /directory/d1/my file is here.doc, the command errors off.

如何让ClearCase / unix接受空间?

How do I get ClearCase/unix to accept the space?

推荐答案

您必须使用 cleartool mklabel

You have tow approaches with cleartool mklabel:


  • 您可以直接使用mklabel,并带有 -recurse 选项。

    将标记所有文件(带或不带空格) ) 为了你。但这可以标记不在当前视图中的文件。

  • you can use mklabel directly, with the -recurse option.
    That will label all the files (with or without space) for you. But that can label files that are not in your current view.

 cleartool mklabel -recurse -replace -follow VPCEUM_9.0.0.99


  • 或者,正如我在 清除工具:如何将标签应用于仅在当前视图中的文件?,您可以使用cleartool查找:

  • Or, as I mentioned in "Cleartool: How to apply label to files which are in my current view only?", you use cleartool find:

    # Windows syntax
    cleartool find . -cview -exec "cleartool mklabel -replace TEST_LABEL \"%CLEARCASE_XPN%\""
    
    # Unix syntax
    cleartool find . -cview -exec 'cleartool mklabel -replace TEST_LABEL "$CLEARCASE_XPN"'
    


  • $ CLEARCASE_XPN 部分允许您使用空格标记文件。

    The "$CLEARCASE_XPN" part allows you to label files with spaces.

    这篇关于在ClearCase中用空格标记文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆