No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
hi i need a litle help.....i must write a program that search for a string in a text file and return the line in the text file were string was found...string its an argv....i wrote this code but it returns the whole text file when i search for something [CODE=c] … | |
i have to write C code for linux commands wich , apropos ,whereis(for a linux mini shell)..... if someone can tell me how to start...or help me with some links... which - shows the full path of (shell) commands --i need that comand to show me only the path of … | |
hi..pls help me with this ...when i run this c program i get in result segmentation fault message (i run in ubuntu terminal): [CODE=c]#include<stdio.h> #include<utmp.h> int main() { char *s,*c; struct utmp *u; int i; c=getlogin(); setutent(); u=getutent(); while(u!=NULL) { if(u->ut_type==7 && strcmp(u->ut_user,c)==0) { printf("%-12s",u->ut_user); printf("%-9s",u->ut_line); s=ctime(&u->ut_time); for(i=4;i<16;i++) printf("%c",s[i]); printf("(%s",u->ut_host); … | |
hi i m beginer in C++ programing.....can someone help me with a problem : i have to program the linux comand hostname in C++.....the c++ program should return the local hostname....thx |