Bash Trim: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * bash =Overview= <syntaxhighlight lang='bash'> trailing_space_removed=${var_name%%space:} leading_space_removed=${var_name##:sp...")
 
Line 1: Line 1:
=Internal=
=Internal=
* [[Bash#bash_Script_Library|bash]]
* [[Bash#bash_Script_Library|bash]]
* [[Bash_Parameter_and_Variable_Expansion#Delete_Longest_Matching_Leading_String|Parameter and Variable Expansion]]
=Overview=
=Overview=
<syntaxhighlight lang='bash'>
<syntaxhighlight lang='bash'>

Revision as of 20:21, 20 September 2019

Internal

Overview

trailing_space_removed=${var_name%%[[:space:]]}
leading_space_removed=${var_name##[[:space:]]}