From 0bf5771fe3fafcb60ebf4541b8d382eb0ec9f7bc Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sun, 20 Feb 2022 15:08:55 +0100 Subject: [PATCH] Use [[:space:]] instead of \s for portability E.g., FreeBSD sed does not support \s, which leads to the following error: sed: 1: "s/\s*=\s*/=/": RE error: trailing backslash (\) --- ssh-facts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh-facts b/ssh-facts index 98ce191..8126715 100755 --- a/ssh-facts +++ b/ssh-facts @@ -49,7 +49,7 @@ if [[ -z $1 || $1 == "--help" ]]; then exit 1 fi -ssh "$@" 'bash -s' 2>/dev/null <<'END' | sed 's/\s*=\s*/=/' +ssh "$@" 'bash -s' 2>/dev/null <<'END' | sed 's/[[:space:]]*=[[:space:]]*/=/' function _os() {