diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 5f89f85..8d86cf6 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -384,7 +384,7 @@ insert_line() { after) offset=1;; esac; line=$((`grep -n "$4" $1 | head -n1 | cut -d: -f1` + offset)); - if [ "$(wc -l $1 | cut -d\ -f1)" -le "$line" ]; then + if [ "$(wc -l $1 | cut -d\ -f1)" -lt "$line" ]; then echo "$5" >> $1; else sed -i "${line}s;^;${5}\n;" $1;