I ran the following one line code on Red Hat Enterprise Linux Server release 6.6 (Santiago)
grep -rl 'room' book/ | xargs sed -i 's/room/equipment/g'
And I got the following message
sed: can't read book/
book/del_entry_ajax.php: No such file or directory
Acutally I can run
grep -rl 'room' book/del_entry_ajax.php | xargs sed -i 's/room/equipment/g'
successfully and then run the first command again, I got
sed: can't read book/
: No such file or directory
Why is that and how can I fix it?