1

I am running all ClearCase commands in shell script and every command is redirecting output to a file:

cleartool diffbl -act -ver label1 label2 >& data.txt
cleartool diffbl -baselines label1 label2 >& data.txt
cleartool diffbl -elements label1 label2 >& data.txt

The issue is that all commands are running fine and generating diff log files, but it's not appending the output in same file.

Please anyone suggest how to proceed ?

I have tried with >> Also it's not working .. it's generating output in diff files. I need single output file for all commands .

  • `cleartool cmd1 >> data.txt 2>&1`, followed by `cleartool cmd2 >> data.txt 2>&1` should generated the output of `cmd1` and `cm2` **in the same `data.txt` file**. If not, please mention in your question what OS you are using (Windows? Unix? what shell? Powershell, DOS? bash? csh? zsh?...) – VonC Feb 24 '12 at 09:29

1 Answers1

0

To append, you should use >> instead of >.

See:

So in your case, for a bash session (with append of stdout and stderr):

cmd >>file.txt 2>&1
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250