I love working with Unix again. Get a load of this:
for i in `grep -il ‘^#[ ].mine.’ sh`
do
if grep -lqE ’^[ ].mine.|^mine.’ $i
then echo $i
fi
done
This finds you a file with a line that isn’t a shell script comment but contains the string mine with a full stop at the end of it. If the mine string has a space or a tab in front of it or is at the beginning of a line then print the file name out. I’m using this to identify files that have the hard coded schema mine in them so that I can do a bulk update and put a system id in there:
cat «EOF | ex $i # $i is the file id’d earlier
%s/(mine)./1${DOMAIN_ID}./g
EOF
Just try doing this on an NT system.
Have fun children, there’s loads of other things to talk about but I’m too tired, spent all day at an out of bounds first aid course.