sort shell

Hello,
re�aliser I'd like a program that sorts the entries in a directory under different options:

-R: Sorting the contents of the directory tree starting at pos. In this case we will sort with respect to the names of the entries but it will show the path;

-D: sort in descending order by default the sorting is done in ascending order;

-Nsdletpg: You can specify the sorting criterion used. these criteria can be combined, in this case if two files are identical to the first criterion, the second criterion the d�partegera and so on;

-N: sorting after the name of the entries;
-S: sort according to size of entries;
-M: sort of the date of last modification of entries;
-L: sorting by number of line entries;
-E: sorting following the expansion of entries "characters found after the last name of the entries;
-T: sort according to file type (order: directory, files, links, block special file dee, character special file, named pipe, socket)

-P: sorting according to the owner of the entry

G-sorting according to the group owner's entry.

I give a small example of Result when should have:

sortshell -d - r - pse /home sort , descending order, tree starting at / home owners based on entries as the first criterion, the size of entries as the second criterion and the expansion of entries last criterion.

ps: we have no right to use ls or sorts
thank you to all who can help me

Do not post classroom or homework problems in the main forums. 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.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.