Can anyone help? I have to Write a program in C that recognizes the following commands and translate

I have to

Write a program in C that recognizes the following commands and translates them into much simpler ones

Commands to recognize shorter command

list

L

cd dir

[LEFT]C - dir_length - dir
get file_name G - file_name_length - file_name [/LEFT]

Long commands are read from the standard input and short commands are written to the standard output. To do it, follow these rules:

1) Recognize the command
2) If the command has a parameter, create a function that reads this parameter character by character and return a dynamic list with all the characters and the number of characters.
(REMEMBER: the size of the command has no limitation in size!!!!)

i have done the same script with if...else(everything was ok)

i am bit confused....i can't understand the dynamic list...

whatever, thank you everybody..

Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

Thank You.

The UNIX and Linux Forums.