<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">sudo apt-get update >file
      2>&1<br>
      <br>
      to get the errors coincident with the standard output<br>
      the following page is well-written and fairly clear:<br>
      <br>
      <a class="moz-txt-link-freetext" href="http://www.tldp.org/LDP/abs/html/io-redirection.html">http://www.tldp.org/LDP/abs/html/io-redirection.html</a><br>
      <br>
      On 04/07/2015 12:10 AM, Michael Havens wrote:<br>
    </div>
    <blockquote
cite="mid:CAFRvun+3jAx6mzjkOQY-Se4sQ3Te5HoNbzUc2wZR-R4DMgtZ8Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">I am writing someone a letter. He has script that
        runs apt-get update/grade in one swoop. Something happened once
        and he needed to see what files had upgraded but because nothing
        print to screen he had no idea which files did. Could someone
        tell me if I am telling it correctly? In the unfinished
        paragraph I am unsure how to finish it. What I want to do is
        prepend 'file' with the date. How is it done?
        <div>Here is the letter:<br>
          <div><br>
          </div>
          <div>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">you know
              wiz, you might want to make your script print the output
              of update/upgrade to a file in case something like this
              happens again and you need to see what it did. You do this
              by typing:</p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px"><br>
            </p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">   sudo
              apt-get update > file</p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">   sudo
              apt-get upgrade >> file</p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px"><br>
            </p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">If you want
              it to print any errors that may have scrolled by to the
              file you'll have to pre-pend the carrots with '&2' to
              make it look like this:</p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px"><br>
            </p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">   sudo
              apt-get update &2> file</p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">and </p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">   sudo
              apt-get upgrade &2>> file</p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px"><br>
            </p>
            <p style="margin:0px;font-family:'Helvetica
              Neue',Arial,Verdana,sans-serif;font-size:14px">I'm pretty
              sure that is how it is done at least. I wouldn't worry
              about making 'file' unique for each time you run it as
              you'll never look at it unless there is a problem. If you
              really want to do that </p>
            <div>
              <div class="gmail_signature">:-)~MIKE~(-:</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">---------------------------------------------------
PLUG-discuss mailing list - <a class="moz-txt-link-abbreviated" href="mailto:PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a>
To subscribe, unsubscribe, or to change your mail settings:
<a class="moz-txt-link-freetext" href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></pre>
    </blockquote>
    <br>
  </body>
</html>