I need help, i am trying to create a shell in minix3, and i want to create my own "ls" command, so at the moment i am using the execvp
command. The only problem is that i would like it to all output on a single line, instead of each directory on their own line. I have been attempting to get this correct for quite some time and i just cant seem to get it right. I am not sure if this is possible or not but any advice on how to achieve the final product without having to use system()
would be greatly appreciated!
Example of my Code:
char* arg[] = {"ls", "-1", NULL};
execvp(arg[0], arg);
Thank you in advanced!