shell script to merge files

Can anybody help me out with this problem

" a shell program that takes one or any number of file names as input; sorts the lines of each file in ascending order and displays the non blank lines of each sorted file and merge them as one combined sorted file. The program generates an error message in case any input file does not exist. "

Read the forum rules.

No homework questions on ANY of these technical forums.

That includes the "UNIX for Dummies Questions & Answers" on which you have also posted a homework question.