I have been banging my head against this problem all evening but have finally tracked it down to a very odd bash error.
I need to copy some files like the md5 checksums on Suse, so I decided to make a temp dir called md5 to work on them but the directories never got created.
No error to console , nothing in logs, mkdir did not seem to return any error code either.
I finally found that if I called it md55 or just about any other name it worked as expected. I can also do I from cli, so why the hell cant bash do it within a script and more over why dont I get an error?
Code: Select all
#!/bin/bash
READBACK=/wine/suse-readback/;
TARGET=/wine/SU102-DVD/;
CD_ISO_DIR=/var/www/localhost/htdocs/;
DVD_ISO_DIR=/wine/suse-dvd/;
ISOBASENAME="openSUSE-10.2-GM-i386-";
pwd
[ -d $TARGET ] && rm -rf $TARGET;
mkdir -p $TARGET;
#[ -d $READBACK ] || mkdir -p $READBACK
echo "i586">files.txt;
echo "i686">>files.txt;
echo "noarch">>files.txt;
for PLATFORM in `cat files.txt` ; do
# PLATFORM="i686";
MD5="md5";
# mkdir -p $TARGET$MD5;
mkdir -p $TARGET$MD5 || echo "make md5 failed";
done
echo $TARGET$MD5$PLATFORM;
TIA, Gentree.


