HEEELLLLPPPP!!!!
I've been developing a basic suite of apps to get to know Shell Scripting in Fedora 1 Linux. I have 2 applications done and bug-free, but my third is no... here is the code:
#-------------Credits------------
# (C) 2005 Kid Kompany
# Written by Chris Szentkiralyi
# v1.5
#--------------------------------
#!/bin/sh
makeDir() {
if mkdir "_$dir"
then
echo "Directory _$dir created..."
else
echo "ERROR: Directory could not be created"
fi
}
changeDir() {
if cd "_$dir"
then
echo "Directory changed to $dir"
else
ECHO "ERROR: Directory could not be changed"
fi
}
copyFiles() {
if cp *.* _$dir
then
echo "Files copied to _$dir"
else
echo "ERROR: Could not copy files to _$dir"
fi
}
read dir
makeDir
changeDir
copyFiles The problem is that I can't seem to get the copyFiles() function to work right. It won't let me use '*.*' to copy all of the files... and I am out of ideas. PLEASE HELP!!!