From 188289d21518efbbb782b2d0236e6fa7613c50a5 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 28 Jul 2014 19:50:26 -0700 Subject: [PATCH] fix bug reading file --- appendu | 3 ++- appendu-function | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/appendu b/appendu index 1e3d583..d03fb45 100755 --- a/appendu +++ b/appendu @@ -75,7 +75,8 @@ LINE_SETs are treated the same. sed -ie '$a\' "$file" # command substitution removes any trailing newlines, so we have to add # a non-newline ending, we randomly chose "b", then remove it. - local content=$(cat "$file"; echo b) content=${content%b} + local content=$(cat "$file"; echo b) + content=${content%b} fi # we aren't using regex because we want to match strings, diff --git a/appendu-function b/appendu-function index 8b03b0f..00b4cf3 100644 --- a/appendu-function +++ b/appendu-function @@ -75,7 +75,8 @@ LINE_SETs are treated the same. sed -ie '$a\' "$file" # command substitution removes any trailing newlines, so we have to add # a non-newline ending, we randomly chose "b", then remove it. - local content=$(cat "$file"; echo b) content=${content%b} + local content=$(cat "$file"; echo b) + content=${content%b} fi # we aren't using regex because we want to match strings, -- 2.30.2