From a6e45e26f178bd871a65a3e6610517c3746eb604 Mon Sep 17 00:00:00 2001 From: Dominik Gleich Date: Fri, 8 Dec 2023 06:55:38 +0100 Subject: [PATCH] Replace space with [[:space:]] --- nixos-infect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos-infect b/nixos-infect index 6a16c0c..e511c01 100644 --- a/nixos-infect +++ b/nixos-infect @@ -20,7 +20,7 @@ makeConf() { local IFS=$'\n' for trypath in /root/.ssh/authorized_keys /home/$SUDO_USER/.ssh/authorized_keys $HOME/.ssh/authorized_keys; do [[ -r "$trypath" ]] \ - && keys=$(sed -E 's/^.* ((sk-ssh|sk-ecdsa|ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \ + && keys=$(sed -E 's/^.*[[:space:]]((sk-ssh|sk-ecdsa|ssh|ecdsa)-[^[:space:]]+)[[:space:]]+([^[:space:]]+)([[:space:]]*.*)$/\1 \3\4/' "$trypath") \ && [[ ! -z "$keys" ]] \ && break done