files="/dev/MAKEDEV /etc/makedev.d /usr/sbin/mksock"
# $i will hold single file at a time in following loop
for i in $files
if [ ! -f $i -o ! -d $i ]; then
As I was writing shell code I ll add also some links to a bash scripting manual and another for reguraler exprssions , I have a think head but i have a tendency to complety forget who the regex work , you have to admit that cobol people gave us the worst heritage ever
For the shell scripting you can you can start from here : http://www.freeos.com/guides/lsst/
For the reg ex ( mainly sed and grep ) check this link : http://www.bsd.org/regexintro.html, for sed http://www.grymoire.com/Unix/Sed.html