From f45323a276a39a3f52a9eb491d965a1d34a1be22 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 13 Nov 2022 09:46:35 -0700 Subject: hstow: strip leading whitespace from one case of output from wc(1) Thanks to Mike Lee Williams for reporting the problem. --- bin/hstow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/hstow') diff --git a/bin/hstow b/bin/hstow index f05f0aaf..8fbec796 100755 --- a/bin/hstow +++ b/bin/hstow @@ -131,7 +131,7 @@ stow () { unstow () { cd "$HOME" - dir_pat="^.$(echo $DIR | cut -c$(echo $HOME | wc -m)-)/" + dir_pat="^.$(echo $DIR | cut -c$(echo $HOME | wc -m | tr -d ' ')-)/" for file in $(find . -type l ! -name . ! -name "$cchars" \ | grep -v "$dir_pat"); do if readlink "$file" | grep -Eq '^(\.\./)*\.STOW/'"$NAME/"; then -- cgit v1.2.3