Simulated shell and user commands in C