need help on the 'sed' scripting command from expert

view story

http://ubuntuforums.org – hi, I have used the cat command to combine several files, like this: Code: cat file1 file2 file3 > file4 then, I used the sort command on file4. let's say for example that file4 now looks like this: Code:   1  a 1 A     2 b  #  comment here 2 B 3  c # more comments here 3 c (and so on ) question: How can I use the sed cammand to: 1) take out all the blank lines 2) take out any line that the first non-blank character is a '#' ( otherwords, remove the comments ) 3) make all the text lower case ( or upper case, do (Hardware)