Usuwanie spacji z zmiennych w bash
Article Number: 33 | Rating: Unrated | Last Updated: Tue, May 22, 2018 8:58 PM
Usuwanie początkowych / „wiodących” spacji z zmiennej:
ZMIENNA="${ZMIENNA#"${ZMIENNA%%[![:space:]]*}"}"
Usuwanie końcowych / „wleczących” spacji z zmiennej:
ZMIENNA="${ZMIENNA%"${ZMIENNA##*[![:space:]]}"}"
Posted - Tue, May 22, 2018 8:58 PM. This article has been viewed 2594 times.
Filed Under:
Bash
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Related Articles

Utilities to Tidy Up Your Reports
Viewed 16388 times since Wed, May 30, 2018
10 Awk Tips, Tricks and Pitfalls
Viewed 6096 times since Wed, Aug 19, 2020
10 Xargs Command Examples in Linux / UNIX
Viewed 4119 times since Fri, Jun 1, 2018
awk printf
Viewed 15519 times since Wed, Aug 19, 2020
Bash: String Length – How To Find Out
Viewed 2329 times since Mon, Feb 18, 2019
Script HW/SW AIX
Viewed 9383 times since Mon, Jun 4, 2018