The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to Achive IP address through MAC(Ethernet) address krishnacins IP Networking 3 08-29-2005 05:45 PM
ce0 and ce1 have the same mac address BG_JrAdmin SUN Solaris 2 07-08-2005 04:30 PM
network address and broadcast address? pnxi UNIX for Dummies Questions & Answers 7 11-10-2003 08:29 PM
IP address krishna UNIX for Advanced & Expert Users 10 03-20-2002 02:36 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #8  
Old 02-06-2007
Registered User
 

Join Date: Feb 2007
Posts: 11
I know this may sound like I'm stupid, but what should kcsdev be changed to.
Reply With Quote
Forum Sponsor
  #9  
Old 02-06-2007
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
Whatever the hostname program returns - the name of the box you are running the query on

Code:
kcsdev:/home/jmcnama> hostname
kcsdev
kcsdev:/home/jmcnama>
Reply With Quote
  #10  
Old 02-08-2007
Registered User
 

Join Date: Feb 2007
Posts: 11
The program just prints no.

The program just prints no.
Reply With Quote
  #11  
Old 02-08-2007
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,274
What does
Code:
uname -a
show?
I don't know SCO, but I'm hoping they can spell POSIX - a set of UNIX standards
Reply With Quote
  #12  
Old 02-08-2007
Registered User
 

Join Date: Feb 2007
Posts: 11
Smile I found the solution

I'll post, thanks Jim for all of your help it is appreciated.

#include <stdio.h>

int main()
{

FILE *cmd=popen(" ndstat | grep net0 | awk '{print $3}'", "r");
char tmp[80]={0x0};

while(fgets( tmp, sizeof(tmp), cmd)!=NULL)
{
printf("%s\n", tmp);
}
pclose(cmd);
return 0;
}

I'm going to post a new thread about md5 hashing, in unix (SCO) environment. Hope to see you there
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:32 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0