HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Detecting a talk query to use in shell script
Operating System - HP-UX
1837097
Members
2210
Online
110112
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
03-22-2006 10:28 PM
03-22-2006 10:28 PM
Detecting a talk query to use in shell script
Hi
I want to write a shell script in which
whenever someone tries to chat me using the "talk " command, the system has to automaticaly respond to make the coneection.
I will run the script in background.But what i need is how my script will understand that there is a query from another user to establish a connection.
You may feel it too silly... why such things..but i require.
please help.
Thanks in advance
S.O
I want to write a shell script in which
whenever someone tries to chat me using the "talk " command, the system has to automaticaly respond to make the coneection.
I will run the script in background.But what i need is how my script will understand that there is a query from another user to establish a connection.
You may feel it too silly... why such things..but i require.
please help.
Thanks in advance
S.O
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 10:35 PM
03-22-2006 10:35 PM
Re: Detecting a talk query to use in shell script
Down and dirty script. you script should be checking the talk processe. Once it sees it, it warns/alerts you.
This is easy. You script in background keeps doing following every minute and alerts you.
UNIX95= ps -Ctalk -o pid,ruser,args
If there is a talk, process trying to talk to you, it will be seen as follows.
talk "user_name" dev/pts/39
This is easy. You script in background keeps doing following every minute and alerts you.
UNIX95= ps -Ctalk -o pid,ruser,args
If there is a talk, process trying to talk to you, it will be seen as follows.
talk "user_name" dev/pts/39
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2006 11:15 PM
03-22-2006 11:15 PM
Re: Detecting a talk query to use in shell script
from remote all connections will come though port 517 on udp. So for remote logins U could do something like this:
tcpdump udp port 517 >> /tmp/dumpout
All remote connections would be loged to /tmp/dumpout.
For local connections you could write a small program call talk that do some logging and then rename the old one and call it from talk.
mv /usr/bin/talk /usr/bin/talk.org
#!/usr/bin/ksh
# filename : /usr/bin/talk
echo `date; id` >> /tmp/dumpout
/usr/bin/talk.org
tcpdump udp port 517 >> /tmp/dumpout
All remote connections would be loged to /tmp/dumpout.
For local connections you could write a small program call talk that do some logging and then rename the old one and call it from talk.
mv /usr/bin/talk /usr/bin/talk.org
#!/usr/bin/ksh
# filename : /usr/bin/talk
echo `date; id` >> /tmp/dumpout
/usr/bin/talk.org
jaton
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP