<?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 Re: Getting an ID reply from a terminal in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441351#M7568</link>
    <description>This is what I do for root connections, may it inspire you:&lt;BR /&gt; LOG='who am i -R' &lt;BR /&gt; ME=$LOGNAME&lt;BR /&gt;(date;echo $ME;$LOG)|xargs &amp;gt;&amp;gt;/var/adm/root/.log&lt;BR /&gt;export ME</description>
    <pubDate>Wed, 30 Aug 2000 15:02:24 GMT</pubDate>
    <dc:creator>Victor BERRIDGE</dc:creator>
    <dc:date>2000-08-30T15:02:24Z</dc:date>
    <item>
      <title>Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441349#M7566</link>
      <description>I'm not sure how to put it.  We want to include into our global profile a little script that will prompt user's terminal to identify itself and upon terminal's request, greet the user with something like:&lt;BR /&gt;&lt;BR /&gt;"You have logged on using VT100, or VT200, or Reflections and so on."&lt;BR /&gt;&lt;BR /&gt;What we have so far is this:&lt;BR /&gt;&lt;BR /&gt;echo "033[0;1234c" which prompts the terminal for ID and we know that it answers back (we have tested it on a command line).&lt;BR /&gt;&lt;BR /&gt;Now, how do I capture the response and send a message back based on it?&lt;BR /&gt;&lt;BR /&gt;I tried redirecting it to the file, grepping and so on but this does not work.  If I try to cat that file, it simply responds back with a beep.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 30 Aug 2000 14:55:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441349#M7566</guid>
      <dc:creator>Bolek Mynarski</dc:creator>
      <dc:date>2000-08-30T14:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441350#M7567</link>
      <description>Why not simply echo $TERM ?&lt;BR /&gt;in your .profile</description>
      <pubDate>Wed, 30 Aug 2000 14:59:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441350#M7567</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2000-08-30T14:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441351#M7568</link>
      <description>This is what I do for root connections, may it inspire you:&lt;BR /&gt; LOG='who am i -R' &lt;BR /&gt; ME=$LOGNAME&lt;BR /&gt;(date;echo $ME;$LOG)|xargs &amp;gt;&amp;gt;/var/adm/root/.log&lt;BR /&gt;export ME</description>
      <pubDate>Wed, 30 Aug 2000 15:02:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441351#M7568</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2000-08-30T15:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441352#M7569</link>
      <description>Have you tried &lt;BR /&gt;echo .....&lt;BR /&gt;read REPLY (or any variable name)&lt;BR /&gt;&lt;BR /&gt;The response from the terminal should then be in $REPLY</description>
      <pubDate>Wed, 30 Aug 2000 15:08:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441352#M7569</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-08-30T15:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441353#M7570</link>
      <description>I use:&lt;BR /&gt;&lt;BR /&gt;TERM=`ttytype`&lt;BR /&gt;export TERM&lt;BR /&gt;echo 'Your Term is:' $TERM</description>
      <pubDate>Wed, 30 Aug 2000 15:19:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441353#M7570</guid>
      <dc:creator>Tracey</dc:creator>
      <dc:date>2000-08-30T15:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441354#M7571</link>
      <description>I did not express myself clearly. O.K.&lt;BR /&gt;When I'm logged on using "Reflections" terminal, my term can be set to vt200 or whatever, and true, when I type echo $TERM, it will display vt200.  However, what I want to get is this info:&lt;BR /&gt;&lt;BR /&gt;when I type echo "033[0;1234c", it queries the terminal client which responds back with:&lt;BR /&gt;&lt;BR /&gt;[bmynars@optivity /home/bmynars/bin]$ W02-600L333333&lt;BR /&gt;sh: W02-600L333333:  not found.&lt;BR /&gt;&lt;BR /&gt;It looks like it starts a subprocess.  What I want to capture is W02-600L333333 (not type of term which would be vt200.&lt;BR /&gt;&lt;BR /&gt;That's what I can't do.</description>
      <pubDate>Wed, 30 Aug 2000 15:46:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441354#M7571</guid>
      <dc:creator>Bolek Mynarski</dc:creator>
      <dc:date>2000-08-30T15:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441355#M7572</link>
      <description>Have you tried:&lt;BR /&gt;&lt;BR /&gt;CONNECTION=`echo "033[0;1234c"`  (note: backtics not quotes)&lt;BR /&gt;&lt;BR /&gt;echo "Your connection type is $CONNECTION"</description>
      <pubDate>Wed, 30 Aug 2000 15:54:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441355#M7572</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2000-08-30T15:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441356#M7573</link>
      <description>Hi Alan:&lt;BR /&gt;&lt;BR /&gt;"Have you tried: &lt;BR /&gt;&lt;BR /&gt;CONNECTION=`echo "033[0;1234c"` (note: backtics not quotes) &lt;BR /&gt;&lt;BR /&gt;echo "Your connection type is $CONNECTION"&lt;BR /&gt;"&lt;BR /&gt;&lt;BR /&gt;If you run "033[0;1234c" only, it will simply echo back exactly the same thing. So, if you put ""033[0;1234c" then you get response back but we're back to square one.  It looks like this command opens a subshell and tries to run there.  How do I capture it?</description>
      <pubDate>Wed, 30 Aug 2000 16:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441356#M7573</guid>
      <dc:creator>Bolek Mynarski</dc:creator>
      <dc:date>2000-08-30T16:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441357#M7574</link>
      <description>I meant 033[0;1234c</description>
      <pubDate>Wed, 30 Aug 2000 16:02:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441357#M7574</guid>
      <dc:creator>Bolek Mynarski</dc:creator>
      <dc:date>2000-08-30T16:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441358#M7575</link>
      <description>I noticed that my '' slashes are missing.  So, there is a "backslash" in front of "033[0;1234c".</description>
      <pubDate>Wed, 30 Aug 2000 16:03:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441358#M7575</guid>
      <dc:creator>Bolek Mynarski</dc:creator>
      <dc:date>2000-08-30T16:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441359#M7576</link>
      <description>Your echo statement causes the terminal emulation software to respond with configuration info (as if you had typed it in). &lt;BR /&gt;&lt;BR /&gt;Simply using the 'read' command allows you to get the reply into a shell variable. See my response above.</description>
      <pubDate>Wed, 30 Aug 2000 16:04:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441359#M7576</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2000-08-30T16:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting an ID reply from a terminal</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441360#M7577</link>
      <description>Thanks John.  I don't know what I was thinking when I as trying to pipe read. :-)&lt;BR /&gt;That solved my problem.</description>
      <pubDate>Wed, 30 Aug 2000 17:07:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/getting-an-id-reply-from-a-terminal/m-p/2441360#M7577</guid>
      <dc:creator>Bolek Mynarski</dc:creator>
      <dc:date>2000-08-30T17:07:10Z</dc:date>
    </item>
  </channel>
</rss>

