The task is to create a simple command line interpretor. It should say a prompt like ‘$>’ showing that it is prepared to accept a user command. It has to execute user commands, from the list of accepted commands.
1. The "nl" command. Parameters that need to be implemented are: -s, -d
2. The "mv" command. Parameters that need to be implemented are: -i, -t -s
3. The "cd" command. No parameters need to be implemented.
The nl command -s, –number-separator=string
Separates the line number from the text line in the output with string (default is a TAB character).Command nl-d, –section-delimiter=cc Sets the two delimiter characters that indicate the beginnings of logical page sections; if only one is given, the second remains ‘:’. To enter ‘\’, use ‘\’.
The mv renames a file or moves it from one directory to another directory.Command mv-i prompts before overwriting another file and for the other two I couldn’t find any specifications whatsoever.
The cd command is used to get back to home directory.
So fart that is all I know. It has to be written in C but be appropriate for UNIX. I have not started anything and I would appreciate any help and suggestions. Thanks.
use existing open source applications.
I think busyBox contains a such behaviour