does a system call return value??
if not how would i get the menu choice to return some value
Code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#define script "dialog --backtitle \"Linux Shell Script Tutorial\" \
--title \"Main Menu\" --menu \
\"Move using [UP] [DOWN],[Enter] to Select\" 15 50 3\
1 \"Shows Date and Time\" 2 \"To see calendar\" 3 \"To start vi editor\" "
int main(int arg1, char *arg2[])
{
int a;
a=system(script);
printf("hello");
printf("%d",a);
return 0;
}
thanks for your time