Appending output of a Batch file To log file

后端 未结 4 1319
暖寄归人
暖寄归人 2020-12-07 23:10

I have a batch file which calls a java program.

The output is redirected to a log file in the same directory. However the log file is replaced everytime the batch fi

4条回答
  •  难免孤独
    2020-12-07 23:26

    It's also possible to use java Foo | tee -a some.log. it just prints to stdout as well. Like:

    user at Computer in ~
    $ echo "hi" | tee -a foo.txt
    hi
    
    user at Computer in ~
    $ echo "hello" | tee -a foo.txt
    hello
    
    user at Computer in ~
    $ cat foo.txt
    hi
    hello
    

提交回复
热议问题