diff --git a/sssg.sh b/sssg.sh index fd993d1..c70b42a 100755 --- a/sssg.sh +++ b/sssg.sh @@ -40,7 +40,10 @@ function parse { sed -n "1,$end_line{p}" $1 >> _site/$1 else start_line="$(expr ${last_find%%:*} + 1)" - sed -n "$start_line,$end_line{p}" $1 >> _site/$1 + if [ $start_line -le $end_line ] + then + sed -n "$start_line,$end_line{p}" $1 >> _site/$1 + fi fi #inc_file="$(sed "$i!d" $1)" inc_file=${i#*:}