How to pass file name to sed

grep, sed, unix

Solution

This is how I got it to work! :)

 grep -rl 178 ../network/ | xargs sed -i 's/178/179/g'

Problem

I'm trying the following ``` grep 178 * | sed 's/178/179/g' Results: ifcfg-bond0:IPADDR=10.30.10.179 ifcfg-bond1:IPADDR=10.30.8.179 rule-bond0:from 10.30.10.179 table sip ``` However when I try to pass -i option to sed to make changes permanent, I get the following. ``` grep 178 * | sed -i 's/178/179/g' sed: no input files ``` Any ideas?

Original source