I know this is very similar to the question How can I strip first X characters from string using sed?
But I am having trouble storing the output string as a variable in my bash script
myString='Foo: 1234'
echo "$myString"| sed -r 's/^.{5}//'
produces the desired result yet it is not stored in variable.... when i try:
myVariable1=$('"$myString"| sed -r 's/^.{5}//'')
myVariable2='"$myString"| sed -r 's/^.{5}//''
myVariable3=$(""$myString"| sed -r 's/^.{5}//'")
myVariable4=""$myString"| sed -r 's/^.{5}//'"
anyone care to show me where I'm going wrong please