|
|
if you also want to see the output as it happens...
use:
|& tee filenameThis both displays the output normally to stdout (usually your screen) and redirects a copy to the file you've given. For example, I like to keep logs of all my configures and makes for the various unix utilities and tools I install. So I'll use commands like ./configure |& tee ~/Documents/logs/zsh-4.0.4-configure.logand sudo make install |& tee ~/Documents/logs/zsh-4.0.4-install.logfor each of the steps used to configure, make and install the package. I'm able to see the output directly in my terminal screen and automatically get the output saved in my logs directory. There's probably ways to incorporate this into aliases or functions... I know zsh supports global aliases that can be used anywhere in the command, for example. Jim
another cool solution
here is a solution that allows you to direct the output to another terminal window or wherever.
if you also want to see the output as it happens...
This only worked for me (in the bash shell) if I omitted the "&". Cool hint, thanks! |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|