From 1a6241033fd2fe503abc1181c2274af3d46fc468 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 7 Jun 2024 15:45:18 +0200 Subject: [PATCH] =?UTF-8?q?echo=20-n=20=E2=86=92=20printf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cd.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cd.sh b/cd.sh index 13141fd..833a7b9 100644 --- a/cd.sh +++ b/cd.sh @@ -548,7 +548,7 @@ local url for repository in "${CD_GIT_CHILD}" "${CD_GIT_PARENT}" ; do cd_split url="${CD_PROJECTS_URL}/${repository}" - echo -n "\ + printf "\ ${url} ↓ " @@ -556,7 +556,7 @@ ${url} "${url}" "${root}/${repository}" \ || exit path="${root}/${repository}/${repository}" - echo -n "\ + printf "\ ${path} ↓ ${CD_PYTHON_PACKAGES} @@ -589,7 +589,7 @@ local path cd_step "Switch to Python" # path="$(realpath "${0}")" - echo -n "\ + printf "\ ${path} ↓ ${CD_PYTHON_PACKAGES}/${CD_GIT_CHILD} @@ -623,7 +623,7 @@ cd_error_ci () { cd_error_os () { local variable="${1}" - echo -n "× OS: " + printf "× OS: " cd_echo "${variable}" exit ${CD_ERROR_OS} } @@ -709,7 +709,7 @@ cd_split () { cd_step () { CD_STEP=$((CD_STEP+1)) - echo -n "\ + printf "\ ${CD_DOWN} ${CD_VERT} ${CD_STEP} ${@} ${CD___UP} @@ -722,7 +722,7 @@ local text="${2}" if [ "${file}" ] ; then [ -f "${file}" ] && cd_cat "${file}" echo "→ ${1}" - echo -n "${text}" > "${file}" || exit + printf "${text}" > "${file}" || exit cd_cat "${file}" fi }