0

I have to implement the pipe char ' | ' in my own mini shell in C (Linux). for exemple.... after compiling file.c and then ./a.out I should be able to digit ls | sort, and the program should be able to work as the main shell. How can I do such a thing? thanks

Pino
  • 619
  • 1
  • 8
  • 25
  • Do you want to use pipe's with C code? There are some posix functions to do them – Skatox Jun 28 '15 at 14:32
  • My shell should be able to see the char ' | ' in the same way the unix shell see it..I don't know if I explained correctly – Pino Jun 28 '15 at 14:36
  • Related also: http://stackoverflow.com/q/8389033/694576 – alk Jun 28 '15 at 14:41
  • Please in the future do some research before asking. – alk Jun 28 '15 at 14:41
  • the code in this link gives me an error in cmdLine. "error: unknown type name ‘cmdLine’ void runPipedCommands(cmdLine* command, char* userInput) {" – Pino Jun 28 '15 at 15:16

0 Answers0