- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Getting an ID reply from a terminal
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 07:55 AM
08-30-2000 07:55 AM
"You have logged on using VT100, or VT200, or Reflections and so on."
What we have so far is this:
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).
Now, how do I capture the response and send a message back based on it?
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.
Any ideas?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 07:59 AM
08-30-2000 07:59 AM
Re: Getting an ID reply from a terminal
in your .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 08:02 AM
08-30-2000 08:02 AM
Re: Getting an ID reply from a terminal
LOG='who am i -R'
ME=$LOGNAME
(date;echo $ME;$LOG)|xargs >>/var/adm/root/.log
export ME
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 08:08 AM
08-30-2000 08:08 AM
Re: Getting an ID reply from a terminal
echo .....
read REPLY (or any variable name)
The response from the terminal should then be in $REPLY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 08:19 AM
08-30-2000 08:19 AM
Re: Getting an ID reply from a terminal
TERM=`ttytype`
export TERM
echo 'Your Term is:' $TERM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 08:46 AM
08-30-2000 08:46 AM
Re: Getting an ID reply from a terminal
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:
when I type echo "033[0;1234c", it queries the terminal client which responds back with:
[bmynars@optivity /home/bmynars/bin]$ W02-600L333333
sh: W02-600L333333: not found.
It looks like it starts a subprocess. What I want to capture is W02-600L333333 (not type of term which would be vt200.
That's what I can't do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 08:54 AM
08-30-2000 08:54 AM
Re: Getting an ID reply from a terminal
CONNECTION=`echo "033[0;1234c"` (note: backtics not quotes)
echo "Your connection type is $CONNECTION"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 09:01 AM
08-30-2000 09:01 AM
Re: Getting an ID reply from a terminal
"Have you tried:
CONNECTION=`echo "033[0;1234c"` (note: backtics not quotes)
echo "Your connection type is $CONNECTION"
"
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 09:02 AM
08-30-2000 09:02 AM
Re: Getting an ID reply from a terminal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 09:03 AM
08-30-2000 09:03 AM
Re: Getting an ID reply from a terminal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 09:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2000 10:07 AM
08-30-2000 10:07 AM
Re: Getting an ID reply from a terminal
That solved my problem.