String in Linux Programming

Bash supports a surprising number of string manipulation operations.for that,expansion of {} and expr is useful for performing string manipulation.

Find String Length

Syntax


${#string}
							

Example


str = 'Virtualhax Inc.'
echo `expr length $str`
							
Share Share on Facebook Share on Twitter Share on Google+ Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit