From 31b51a526efdb620953761da618527f5335a9fef Mon Sep 17 00:00:00 2001
From: Lukas Krupcik <lukas.krupcik@vsb.cz>
Date: Tue, 19 Jul 2016 08:08:46 +0200
Subject: [PATCH] edit html_md.sh

---
 html_md.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/html_md.sh b/html_md.sh
index 929568cbe..93526f9f6 100755
--- a/html_md.sh
+++ b/html_md.sh
@@ -31,7 +31,7 @@ if [ "$1" = "-w" ]; then
 
 	# test exists file -> yes - kill process wget
 
-	until test -f $FILE
+	until test -f "$FILE"
 	do
 	if [ ! -f "$FILE" ]; then
 		echo "Download..."			 
@@ -40,7 +40,7 @@ if [ "$1" = "-w" ]; then
 	done
 	
 	echo "Download complete..."
-	kill $pid
+	kill "$pid"
 
 	find . -name "@@s*" | 
 	while read i; 
@@ -82,7 +82,7 @@ if [ "$1" = "-c" ]; then
 	do 
 		# filtering html
 		echo "$i"; 
-		echo "\t\tfiltering html files...";
+		printf "\t\tfiltering html files...\n";
 		
 		HEAD=$(cat "$i" | grep -n -m1 '<h1' |cut -f1 -d: | tr --delete '\n')
 		END=$(cat "$i" | grep -n -m1 '<!-- <div tal:content=' |cut -f1 -d: | tr --delete '\n')
@@ -92,7 +92,7 @@ if [ "$1" = "-c" ]; then
 		cat "$i" | sed '1,'"$((HEAD-1))"'d' | sed -n -e :a -e '1,'"$DOWN"'!{P;N;D;};N;ba' > "${i%.*}TMP.html"	
 
 		# converted .html to .md
-		echo "\t\t.html -> .md"
+		printf "\t\t.html -> .md\n"
 		pandoc -f html -t markdown+pipe_tables-grid_tables "${i%.*}TMP.html" -o "${i%.*}.md"; 
 		rm "${i%.*}TMP.html";
 
@@ -113,7 +113,7 @@ if [ "$1" = "-c" ]; then
 		done
 	
 		# text filtering of html, css, ...
-		echo "\t\tautomatic filter..."
+		printf "\t\tautomatic filter...\n"
 		cat filter_auto | 
 		while read y; 
 		do 
@@ -122,7 +122,7 @@ if [ "$1" = "-c" ]; then
 			cat "${i%.*}TMP.md" > "${i%.*}.md";
 		done
 
-		#echo "\t\tother filter..."
+		printf "\t\tother filter...\n"
 		cat filter_other | 
 		while read a; 
 		do 
@@ -137,4 +137,4 @@ if [ "$1" = "-c" ]; then
 	done
 	rm filter_autoTMP
 	rm filter_auto
-fi
+fi
\ No newline at end of file
-- 
GitLab