I am getting problems with the following script when using
Either the variable assignment from the expression for result1
is not working, or the echo statement for result1 isn't working.
Can someone either fix rexster, if that is the problem, or tell
me what to do so that the 3rd output is the word 'jump"?
: '
var1="The quick brown fox jumps over the lazy dog.";
var2="jumps";
echo "----";
echo $var1 | grep -b -o $var2 | cut -d: -f1;
#echo $var1 | grep -b -o $var2 | cut -d: -f1;
result1=$var1 | grep -b -o $var2 | cut -d: -f1;
echo "----";
#20
echo $result1;
echo "----";
result2=${var1:result1:4};
#jump
echo $result2;
echo "----";
'