I need a way to get a list of file names (no directories, no links) from a directory. I will then process that list. One of the steps in the process is to move and rename the file.
the result of for file in /path/* contains the path to the file so a resultant mv $file /newpath/$file fails.
Files are being dropped into /tmp I need to copy them out to a different directory then move them to yet another directory with the current date and time integrated into the file name.
(from others who are helping)
for file in *
if [ -r "$file" ]; then
cp "$file" "$file.extension"
mv "$file" "$(date stuff)$file"