I have tried this command,
grep '/static' dir/* | xargs sed -i 's/\/static//g'
but the version of sed I am using does not support the -i argument.
To replace a string in a file, to the same input file as the output, I normally do this:
sed 's/\/static//g' filename.txt > new_filename.txt ; mv new_filename.txt filename.txt