1

On Windows I’m trying to run cleartool find command and get all versions in a branch that have a specific label, the output should include version and user name.

The command works great the problem is how to to redirect the output to a text file.

    cleartool find -avobs -branch brtype<BRANCH>) -version "lbtype(<LABEL>)" -exec "cleartool describe -fmt \"%Xn : %u\n\" \"%CLEARCASE_XPN%\"

I have tried using >, >>, |, | tee combinations but nothing works

Any idea how to do that ?

Epligam
  • 741
  • 2
  • 14
  • 36

1 Answers1

1

Try to wrap the command in a CMD shell, which can then be redirected:

cmd /C "cleartool find -avobs -branch (brtype<BRANCH>) -version "lbtype(<LABEL>)" -exec "cleartool describe -fmt \"%Xn : %u\n\" \"%CLEARCASE_XPN%\""" > aText
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks, I should have thought about it by myself…. – Epligam Aug 06 '15 at 14:14
  • @Elad no problem: hopefully, it will help others. – VonC Aug 06 '15 at 14:21
  • In continuing to my old question The command I’m using retrieve several ClearCase properties, one of them is the description\comment that may include empty lines, in that case the .csv file I get is wrong since the empty line and any text that appears after it is written to a new line in the .csv file. Any ideas how to solve it ? – Epligam Apr 26 '18 at 10:08
  • @Epligam 3 years later... it looks like you might to do some post-processing of the cleartool command output. Namely put everything on one line, *before* puting it in a .cvs file. – VonC Apr 26 '18 at 11:39