- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Running telnet commands from a C program
Operating System - HP-UX
1819809
Members
2821
Online
109607
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
Discussions
Discussions
Discussions
Forums
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
тАО02-06-2003 02:08 AM
тАО02-06-2003 02:08 AM
Dear All,
Is it possible to run telnet commands from a C program.
I know that there is a well known piece of freeware called expect that will do this and a module in perl that can also do this, but has anyone done in C and could you provide a small example.
Cheers,
Joseph.
Is it possible to run telnet commands from a C program.
I know that there is a well known piece of freeware called expect that will do this and a module in perl that can also do this, but has anyone done in C and could you provide a small example.
Cheers,
Joseph.
Solved! Go to Solution.
- Tags:
- telnet
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2003 02:30 AM
тАО02-06-2003 02:30 AM
Solution
Hi
There are public domain examples
example
http://hpux.cs.utah.edu/hppd/hpux/Networking/WWW/curl-7.9.8/
steve Steel
There are public domain examples
example
http://hpux.cs.utah.edu/hppd/hpux/Networking/WWW/curl-7.9.8/
steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2003 04:31 AM
тАО02-06-2003 04:31 AM
Re: Running telnet commands from a C program
Hi!
It is no difficult. Look at "man" of
functions: execve,execv, execl, execle
Here is simple example of
C-source of executing command "whoami":
function
{ execlp("/usr/bin/whoami","whoami",NULL);
return 0;}
Regards,Stan
It is no difficult. Look at "man" of
functions: execve,execv, execl, execle
Here is simple example of
C-source of executing command "whoami":
function
{ execlp("/usr/bin/whoami","whoami",NULL);
return 0;}
Regards,Stan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2003 05:06 AM
тАО02-06-2003 05:06 AM
Re: Running telnet commands from a C program
And also,
The easiest way to execute a shell-command is to use standard library routine "system".
It takes only 1 argument:
main() {
int stat;
stat = system("date")
/* another rows ...... */
}
Chao,Stan.
The easiest way to execute a shell-command is to use standard library routine "system".
It takes only 1 argument:
main() {
int stat;
stat = system("date")
/* another rows ...... */
}
Chao,Stan.
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP