HPE GreenLake Administration
Operating System - HP-UX
1827856
Members
1546
Online
109969
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
12-25-2001 06:07 PM
12-25-2001 06:07 PM
C script
Dear Friend,
Could anybody help me on doing a C programming of below item:
1. I need to pass in parameter to the C and return in the result.
EXIT_VAL=`rsh -l oracle 192.100.100.100 /export/home/oracle/test.sh $1`
echo "$EXIT_VAL"
Could anybody help me on doing a C programming of below item:
1. I need to pass in parameter to the C and return in the result.
EXIT_VAL=`rsh -l oracle 192.100.100.100 /export/home/oracle/test.sh $1`
echo "$EXIT_VAL"
Performance Issue on HP-UX 10.20
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2001 07:27 PM
12-25-2001 07:27 PM
Re: C script
Hi:
This is pretty simple:
I've deliberately done this is K&R C rather than ANSI C but you can change the protypes if you like:
#include
#include
int main(argc,argv)
int argc;
char *argv[];
{
int cc = 255;
char s_cmd[1024];
if (argc > 1)
{
(void) sprintf(s_cmd,
"rsh -l oracle192.100.100.100 /export/home/oracle/test.sh %s",argv[1]);
cc = system(s_cmd);
printf("%d\n",cc);
}
return(cc);
}
This is pretty simple:
I've deliberately done this is K&R C rather than ANSI C but you can change the protypes if you like:
#include
#include
int main(argc,argv)
int argc;
char *argv[];
{
int cc = 255;
char s_cmd[1024];
if (argc > 1)
{
(void) sprintf(s_cmd,
"rsh -l oracle192.100.100.100 /export/home/oracle/test.sh %s",argv[1]);
cc = system(s_cmd);
printf("%d\n",cc);
}
return(cc);
}
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2001 12:07 PM
12-27-2001 12:07 PM
Re: C script
Hello,
I would recommend to check for semicolons or pipes in the string passed as parameter to NOT allow anything else to be executed!
Just imagine someone calls your script or C-program like that:
program "silly; rm -rf /"
See my point?
Just my $0.02,
Wodisch
I would recommend to check for semicolons or pipes in the string passed as parameter to NOT allow anything else to be executed!
Just imagine someone calls your script or C-program like that:
program "silly; rm -rf /"
See my point?
Just my $0.02,
Wodisch
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP