From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: <u-boot@lists.denx.de>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>,
Lukasz Majewski <lukma@denx.de>,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH] scripts/get_default_envs.sh: Remove blank lines
Date: Wed, 23 Feb 2022 10:33:36 +0100 [thread overview]
Message-ID: <20220223093336.2878-1-cniedermaier@dh-electronics.com> (raw)
After sorting, unnoticed blank lines at the end move to the top.
Avoid this by removing it before sorting.
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Cc: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
---
scripts/get_default_envs.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/get_default_envs.sh b/scripts/get_default_envs.sh
index 3c6fdc45e1..fedf7206fe 100755
--- a/scripts/get_default_envs.sh
+++ b/scripts/get_default_envs.sh
@@ -35,8 +35,8 @@ cp ${env_obj_file_path} ${ENV_OBJ_FILE_COPY}
${OBJCOPY} --dump-section .rodata.default_environment=${ENV_OBJ_FILE_COPY} \
${env_obj_file_path}
-# Replace default '\0' with '\n' and sort entries
-tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort --field-separator== -k1,1 --stable
+# Replace default '\0' with '\n' , remove blank lines and sort entries
+tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sed -e '/^\s*$/d' | sort --field-separator== -k1,1 --stable
rm ${ENV_OBJ_FILE_COPY}
--
2.11.0
next reply other threads:[~2022-02-23 9:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 9:33 Christoph Niedermaier [this message]
2022-04-08 12:30 ` [PATCH] scripts/get_default_envs.sh: Remove blank lines Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220223093336.2878-1-cniedermaier@dh-electronics.com \
--to=cniedermaier@dh-electronics.com \
--cc=lukma@denx.de \
--cc=rasmus.villemoes@prevas.dk \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).