I am trying to save output of Mercurial commands in a file
hg init > log.txt
but its not working. Any ideas?
I am trying to save output of Mercurial commands in a file
hg init > log.txt
but its not working. Any ideas?
The output might be on standard error.
Try hg init 2>&1 > log.txt.
Are you sure the output is not simply silent by default?
hg init, for instance, rarely (if ever?) actually prints any output. Many Mercurial commands are the same way. You can often specify -v to get more verbose output, but in the case of the example you gave, I would expect an empty log.txt to appear. Have you tried other commands? If so, what exactly is not working? Do you get an empty log.txt or no log.txt at all?