From: Ian Kelling Date: Tue, 29 Jul 2014 02:50:26 +0000 (-0700) Subject: fix bug reading file X-Git-Url: https://iankelling.org/git/?p=tee-unique;a=commitdiff_plain;h=188289d21518efbbb782b2d0236e6fa7613c50a5 fix bug reading file --- 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,