Strip Whitespace From Bash Variable

by Kyle on · Posted in

STRING_VAR=`expr "$STRING_VAR" : '[[:space:]]*\(.*\)[[:space:]]*$'`

Save. Share. Submit.

Related Snips

Hide Sidebar