<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Redirection in csh in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362983#M867080</link>
    <description>Hi techies,&lt;BR /&gt;  Could any one explain (or redirect) me to know more about Outpur redirection in C Shell. I want both error and regular output to be written into a file and should also display at the Standard Output.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance,&lt;BR /&gt;-Parmy</description>
    <pubDate>Mon, 23 Aug 2004 08:28:16 GMT</pubDate>
    <dc:creator>parmy_4</dc:creator>
    <dc:date>2004-08-23T08:28:16Z</dc:date>
    <item>
      <title>Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362983#M867080</link>
      <description>Hi techies,&lt;BR /&gt;  Could any one explain (or redirect) me to know more about Outpur redirection in C Shell. I want both error and regular output to be written into a file and should also display at the Standard Output.&lt;BR /&gt;&lt;BR /&gt;Thanks in Advance,&lt;BR /&gt;-Parmy</description>
      <pubDate>Mon, 23 Aug 2004 08:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362983#M867080</guid>
      <dc:creator>parmy_4</dc:creator>
      <dc:date>2004-08-23T08:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362984#M867081</link>
      <description>csh is very bad for this kind of thing.&lt;BR /&gt;&lt;BR /&gt;the nearest you can get is something like: -&lt;BR /&gt;&lt;BR /&gt;touch log ; tail -f log &amp;amp; ; your_command &amp;gt;&amp;amp; log&lt;BR /&gt;&lt;BR /&gt;This should give an idea of the inflexibilities of the csh, in various areas: -&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.ooblick.com/text/CshProgrammingConsideredHarmful.html" target="_blank"&gt;http://www.ooblick.com/text/CshProgrammingConsideredHarmful.html&lt;/A&gt;</description>
      <pubDate>Mon, 23 Aug 2004 09:11:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362984#M867081</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-08-23T09:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362985#M867082</link>
      <description>Parmy,&lt;BR /&gt;&lt;BR /&gt;You can also use the 'tee' command.  Check out man tee(1).  &lt;BR /&gt;&lt;BR /&gt;In my scripts, I'll check if it is interactive, and if so, then I'll pipe the output throught tee.  In this way, the user gets to see the output on the screen, and the output is also being saved in a log file.&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;&lt;BR /&gt;ls -l /etc | tee /tmp/logfile.log&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Mark</description>
      <pubDate>Tue, 24 Aug 2004 08:43:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362985#M867082</guid>
      <dc:creator>Mark Ellzey</dc:creator>
      <dc:date>2004-08-24T08:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362986#M867083</link>
      <description>Only problem with tee is it doesn't capture stderr.  In sh that's fine you can 2&amp;gt;&amp;amp;1, but not in csh.</description>
      <pubDate>Tue, 24 Aug 2004 08:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362986#M867083</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2004-08-24T08:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362987#M867084</link>
      <description>&lt;BR /&gt;Redirection can be done based on the output type weather on STDOUT (output mode ) and STDERR ( error mode).&lt;BR /&gt;&lt;BR /&gt; File descriptor 1 is used for standard ouput and 2 is for standard error.&lt;BR /&gt; hostname 1&amp;gt; /tmp/hostname.file&lt;BR /&gt;&lt;BR /&gt; hostname output will be redirected to /tmp/hostname.file&lt;BR /&gt;&lt;BR /&gt; IF you want to write output and error in on same file then,&lt;BR /&gt; &lt;BR /&gt; -- file.csh --&lt;BR /&gt; hostname&lt;BR /&gt; trr&lt;BR /&gt; --------------&lt;BR /&gt;&lt;BR /&gt; # csh file.csh 1&amp;gt;/filenamewithpath 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt; It will redirect all output / error to that file or&lt;BR /&gt;&lt;BR /&gt; # csh file.csh 1&amp;gt;/filenamewithpath 2&amp;gt;/filenamewithpath&lt;BR /&gt;&lt;BR /&gt; You can also use aslike as,&lt;BR /&gt;&lt;BR /&gt; # csh file.csh 1&amp;gt;&amp;gt;/filenamewithpath 2&amp;gt;&amp;gt;/filenamewithpath&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; Difference between &amp;gt;&amp;gt; and &amp;gt; is &lt;BR /&gt;&lt;BR /&gt;  &amp;gt;&amp;gt; - it will append contents or create new file and add more contents&lt;BR /&gt;&lt;BR /&gt; &amp;gt; - it will create or make null the existing file&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;+Muthu+</description>
      <pubDate>Tue, 24 Aug 2004 10:52:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362987#M867084</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-08-24T10:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362988#M867085</link>
      <description>You also can use the "tee" command for that.</description>
      <pubDate>Wed, 25 Aug 2004 09:17:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362988#M867085</guid>
      <dc:creator>Carlo Corthouts</dc:creator>
      <dc:date>2004-08-25T09:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Redirection in csh</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362989#M867086</link>
      <description>hai,&lt;BR /&gt;&lt;BR /&gt; another command be used for this as script&lt;BR /&gt;&lt;BR /&gt; script test.log&lt;BR /&gt; hostname&lt;BR /&gt; uname -a&lt;BR /&gt; exit&lt;BR /&gt;&lt;BR /&gt; cat test.log will contain your log informations there.&lt;BR /&gt;&lt;BR /&gt;-muthu</description>
      <pubDate>Wed, 25 Aug 2004 09:29:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/redirection-in-csh/m-p/3362989#M867086</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-08-25T09:29:36Z</dc:date>
    </item>
  </channel>
</rss>

