From 5c9c1b72b6ae2c1cae54a45e9989e795ce638b26 Mon Sep 17 00:00:00 2001 From: Daniel Fan Date: Thu, 16 May 2024 12:05:33 -0400 Subject: [PATCH] replace xargs with tr and sed (#1999) Signed-off-by: Daniel Fan --- cp3pt0-deployment/setup_tenant.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cp3pt0-deployment/setup_tenant.sh b/cp3pt0-deployment/setup_tenant.sh index f7c79404d..645997856 100755 --- a/cp3pt0-deployment/setup_tenant.sh +++ b/cp3pt0-deployment/setup_tenant.sh @@ -465,9 +465,9 @@ EOF done existing_ns="${tmp_ns_list}" fi - new_ns_list=$(echo ${existing_ns} ${TETHERED_NS//,/ } ${SERVICES_NS} | xargs -n1 | sort -u | xargs) + new_ns_list=$(echo ${existing_ns} ${TETHERED_NS//,/ } ${SERVICES_NS} | tr ' ' '\n' | sort -u | tr '\n' ' ' | sed 's/ $//') else - new_ns_list=$(echo ${TETHERED_NS//,/ } ${SERVICES_NS} | xargs -n1 | sort -u | xargs) + new_ns_list=$(echo ${TETHERED_NS//,/ } ${SERVICES_NS} | tr ' ' '\n' | sort -u | tr '\n' ' ' | sed 's/ $//') fi debug1 "List of namespaces for common-service NSS ${new_ns_list}"