From: Richard W.M. Jones Date: Thu, 22 Dec 2022 10:31:47 +0000 (+0000) Subject: Rearrange lxc test to avoid use of cat X-Git-Tag: v1.26~18 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a29d4a5632ff9f60f939e4f0f36ce97ed43c5650;p=virt-what.git Rearrange lxc test to avoid use of cat Thanks: Elias Probst --- diff --git a/virt-what.in b/virt-what.in index d090898..170bc24 100644 --- a/virt-what.in +++ b/virt-what.in @@ -175,7 +175,8 @@ fi # Added by Marc Fournier if [ -e "${root}/proc/1/environ" ] && - cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=lxc'; then + tr '\000' '\n' < "${root}/proc/1/environ" | + grep -Eiq '^container=lxc'; then echo lxc fi