Sunday, December 21, 2014

Shell Scripting : Length of a string

In shell scripting, to find the length of a string

#!/bin/bash
line="to do"

echo "Length of string is ${#line}

No comments:

Post a Comment