#!/bin/bash s='Grocery store bank and hardware store Apples Bananas Milk' sed 's/Apples/& Check/g' <<< "$s" sed 's/\<Apples\>/& Check/g' <<< "$s" sed -E 's/\<Apples(\s+Check)?\>/& Check/g' <<< "$s"
Standard input is empty
Grocery store bank and hardware store Apples Check Bananas Milk Grocery store bank and hardware store Apples Check Bananas Milk Grocery store bank and hardware store Apples Check Bananas Milk