Hello and welcome to LQ, hope you like it here.
Combine like this?:
Code:
#!/bin/sh
for i in *; do cat "$i"|sed -e 's/ns3.domain.com./ns1.newdomain.com./' \
-e 's/ns4.domain.com./ns2.newdomain.com./' >>"$i".new; mv "$i.new" "$i"
done
# always clean exit a script
exit 0
BTW, you don't want this:
but something similar to:
Code:
find /some/dir -type f -name "domain*.conf"|while read i; do