I am trying to run some bash commands using C program,
#include<stdio.h>
#include<stdlib.h>
int main()
{
int j;
char a[4]={'a','9','8','4'};
for (j=0;j<=3;j++)
{
printf("a[%d]=%c %p\n",j,a[j],&a[j]);
}
system("a=(a 9 8 4)");
system("echo ${a[*]}");
}
In above code, below lines do not show anything
system("a=(a 9 8 4)");
system("echo ${a[*]}");
Any idea?