I am new to shell scripting I was wondering how do you index a string in bash For example in C++ we would do string[0] to get the first character in the string, how to do a similar thing in shell scripting?
mystring=helloworld
I want to traverse the string character by character For example in C++ I would do
for (auto i = 0;i < mystring.length(); i++)
cout << mystring[i]