SubString in Bash

This is a note for myself.

I have a string “version=1.234.5” and I want to get the value after the equal and keep the value in a variable. Here is what I have done.

 echo $test_str
 echo $ver

In addition, if I want to retain the part before the equal…


Bash looks so cryptic… I use it for wherever necessary but not my favorite language.

Leave a Reply

Your email address will not be published.