You actually don't need the quotes, sed
can deal with spaces and the quotes are taken as being part of the pattern (unless you escape them). Just do this:
ack-grep -l --print0 --text 'laughing babies' | xargs -0 -n 1 sed -i -e 's/laughing babies/smiling little children/g'
I don't see why you want the grep
part though, you could just run sed
directly on all files of the directory, sed
is fast:
sed -i -e 's/laughing babies/smiling little children/g' *