diff --git a/qsgen2 b/qsgen2 index 6eaf84d..8df5a9d 100755 --- a/qsgen2 +++ b/qsgen2 @@ -310,10 +310,10 @@ function _pages() { local page_content="$(<${pages_in_array})" # Grab the title from the Page - page_title=$( echo ${page_content} | head -2 | grep '#title' | cut -d= -f2 ) + page_title=$( grep '#title' ${page_content} | head -2 | cut -d= -f2 ) # Remove the #title line from the buffer. No longer needed. - page_content=$( echo ${page_content} | grep -v '#title' ) + page_content=$( grep -v '#title' ${page_content} ) # HTML'ify the page content page_content=$( ${engine} ${page_content} ) @@ -331,13 +331,13 @@ function _pages() { fi # Insert page_content into pages_tpl by replacing the BODY tag present there - page_tpl=$( echo ${page_tpl} | sed -e "s|BODY|${page_content}|" ) + page_tpl=$( sed -e "s|BODY|${page_content}|" ${page_tpl} ) # Replace every #pagetitle in pages_tpl - pages_tpl=$( echo ${pages_tpl} | sed -e "s|#pagetitle|${page_title}|g" ) + pages_tpl=$( sed -e "s|#pagetitle|${page_title}|g" ${pages_tpl} ) # Replace every #tagline in pages_tpl - pages_tpl=$( echo ${pages_tpl} | sed -e "s|#tagline|${site_tagline}|g" ) + pages_tpl=$( sed -e "s|#tagline|${site_tagline}|g" ${pages_tpl} ) # Replace #updated with today's date and #version with Name and Version to footer pages_tpl=$( _last_updated ${pages_tpl} )