diff --git a/bin/controller.rc b/bin/controller.rc
index 34861ec..05e206f 100755
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -109,7 +109,8 @@ fn genbody {
if ( ~ $blog 'yes' && ~ $body */index.md ) {
if ( ! ~ $#blogTitle 0 )
echo '
'$"blogTitle'
'
- for ( i in `{ ls $blogDirs | grep '[0-9]+.*\.md$'| sort -r -t. +1 } ) {
+ # the /./ is added so we can sort -t. and order only the file name
+ for ( i in `{ ls $blogDirs^'/./' | grep '[0-9]+.*\.md$'| sort -r -t. +1 } ) {
t=`{basename $i|sed -e 's/^[0-9\-]*_//' -e 's,\.md$,,' -e 's/_/ /g' }
du=`{ls -l $i }
#echo '' $"t 'by '$"$du(4)' (Last mod: '$du(7) $du(8) $du(9)')
'