<?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 shell script test in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481971#M18330</link>
    <description>How do you test if a shell script is executing interactively, from a terminal, or from cron?</description>
    <pubDate>Thu, 11 Jan 2001 22:34:04 GMT</pubDate>
    <dc:creator>Mark F Johnson</dc:creator>
    <dc:date>2001-01-11T22:34:04Z</dc:date>
    <item>
      <title>shell script test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481971#M18330</link>
      <description>How do you test if a shell script is executing interactively, from a terminal, or from cron?</description>
      <pubDate>Thu, 11 Jan 2001 22:34:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481971#M18330</guid>
      <dc:creator>Mark F Johnson</dc:creator>
      <dc:date>2001-01-11T22:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: shell script test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481972#M18331</link>
      <description>Hi Mark:&lt;BR /&gt;&lt;BR /&gt;[ -t -eq 0 ] will return true (exit status = 0) if the shell is interactive.&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jan 2001 23:04:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481972#M18331</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-01-11T23:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: shell script test</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481973#M18332</link>
      <description>Hi Mark,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;if [ tty &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 ]&lt;BR /&gt;then&lt;BR /&gt;echo "terminal"&lt;BR /&gt;else&lt;BR /&gt;echo "not a terminal"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;'tty' used alone prints either the terminal name or an error message.Redirecting standard output and standard error removes all messages.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Dan&lt;BR /&gt;</description>
      <pubDate>Fri, 12 Jan 2001 06:35:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-script-test/m-p/2481973#M18332</guid>
      <dc:creator>Dan Hetzel</dc:creator>
      <dc:date>2001-01-12T06:35:22Z</dc:date>
    </item>
  </channel>
</rss>

