While this is somewhat off topic, I am sure that among the Perl Monks are also some Shell Monks...

In updating/re-testing my wxPerl installer script for Ubuntu 14.04LTS based on some good feedback to my eariler post, I discovered that my suggested invocation statement   sh -v wxPerl-Installer.sh > ~Perl/wxPerl-Installer.log was hanging up when something inside the process issued a prompt that wasn't visible on the screen(being hidden in the log file). Other than losing the prompt the mix of screen display vs. log file output is good.

I'm currently using   sh -v wxPerl-Installer.sh 2>&1 | tee wxPerl-Installer.log, but this command sends the mass amount of compiler info(+/- 2MB) to the screen as well as to the log file.

So, can I have it both ways? The display provided by command one without losing the prompts while sending the mass of compiler output only to the log file.

Thanks for your assistance.

Update1:

Thanks for the hints. What I finally decided I wanted for logging was STDOUT containing the mass of compiler output going to a file, STDERR containing a copy of the script(sh -v) and prompts and errors going to the screen and to a file. After much search I arrived at    sh -v wxPerl-Installer.sh 2>&1 >wxPerl-Installer.log | tee wxPerl-Installer.screen

James

There's never enough time to do it right, but always enough time to do it over...


In reply to wxperl Installer Script Logging by jmlynesjr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.