![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Urgent : Help required | V3l0 | AIX | 2 | 01-11-2008 11:37 AM |
| ftp from unix to windows - urgent help required | sam_sal_manu | Shell Programming and Scripting | 1 | 09-04-2007 05:28 PM |
| Urgent help required | umanglalani | Shell Programming and Scripting | 1 | 04-12-2007 03:24 AM |
| Urgent Help required | rahul26 | UNIX for Dummies Questions & Answers | 1 | 08-16-2006 01:23 PM |
| C programming - Urgent help required | kkumar1975 | High Level Programming | 2 | 04-08-2002 07:36 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Urgent help required with uname()
Hello,
I am doing a program in C on UNIX Platform. I am required to make it display the Machine Name, OS name and OS Release version using uname. Now I went through the man pages and found out that uname can be implemented using - #include <sys/utsname.h> int uname (name) struct utsname *name; So after doing this step every time I do printf ("%s", name) ; It displays the operating system name. So I was trying to move forward and I tried printf ("%s", ++name) ; And it gave me some long path name. The third time I tried for release version - printf ("%s", ++name) ; I got this segmentation error. No matter how I try the printf I do not get release version and end up stalling on segmentation error. Can someone help me out on this matter? I just need the correct format for running the various options of uname from the structure utsname. Thanking You in Advance, RM1 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|