files="/dev/MAKEDEV /etc/makedev.d /usr/sbin/mksock"
# $i will hold single file at a time in following loop
for i in $files
do
if [ ! -f $i -o ! -d $i ]; then
exit 1
fi
done
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
No comments:
Post a Comment