I'm trying to get sed to update a variable in a bash script. Here is a simplified example of what I'm trying to do.
myword="this is a test"
echo $myword
this is a test
Swap a test for working
$myword | sed 's/a test/working'
echo $myword
this is working