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 3220 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

Dealing with Funny Files
Viewed 3648 times since Wed, May 30, 2018
HowTo: Clear BASH History
Viewed 2991 times since Mon, Feb 18, 2019
10 Awk Tips, Tricks and Pitfalls
Viewed 6918 times since Wed, Aug 19, 2020
awk printf
Viewed 17454 times since Wed, Aug 19, 2020
O’Reilly’s CD bookshelf
Viewed 15719 times since Wed, Jun 27, 2018
Utilities to Tidy Up Your Reports
Viewed 17193 times since Wed, May 30, 2018