Artificial intelligent assistant

Replacing end of word with something else I have this: echo "walking ringer talking" How do I use sed to achieve the following output? walked ringer talked I've tried several ways, but can't get it to work. The following commands are what I've tried. echo "walking ringer talking" | sed 's/ing/ed/g' This outputs `walked reder talked`. echo "walking ringer talking" | sed 's/ing$/ed/g' This outputs `walking ringer talked`. echo "walking ringer talking" | sed 's/^ing/ed/g;s/ing$/ed/g' This outputs `walking ringer talked`. I'm trying to get this done in a bash script.

add space `'s/ing /ed /g;` in your third test;


#echo "walking ringer talking" | sed 's/^ing/ed/g;s/ing$/ed/g'
echo "walking ringer talking" | sed 's/ing /ed /g;s/ing$/ed/g'


eg:


user@host:/tmp/test$ echo "walking ringer talking" | sed 's/ing /ed/g;s/ing$/ed/g'
walked ringer talked

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 42efe552bc5b543a040fd4450bcb42fe