From 88fd9418a3a2ae3545aa355295e04a63b975087a Mon Sep 17 00:00:00 2001 From: BarbUk Date: Fri, 8 May 2020 20:45:41 +0400 Subject: [PATCH] Handle snippet without EOL fix #3 --- snippy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippy b/snippy index 8893b44..413b52d 100755 --- a/snippy +++ b/snippy @@ -83,7 +83,7 @@ bashdown() { # Simplified version of bashdown, use echo and bash var search and replace # Better handling of symbol char bashdown_simple() { - while IFS= read -r line; do + while IFS= read -r line || [[ -n "$line" ]]; do line="$(eval "echo \"${line//\"/\\\"}\"")" echo "$line" done