move files or a directory to another directory using shell script
I need help in moving a file to a different folder using k-shell script. I am doing a file pattern search in a directory (two levels deep), and if found need to move that file to a different folder.
input_dir = /opt/oracle/client1/
searching in /opt/oracle/client1/test1/work/
All the files with ".done" extension need to be moved to /opt/oracle/client1/test1/Done folder.
This is what I have so far
find "$input_dir" -type f -mindepth 3 -maxdepth 3 | while read filename;
echo "$filename" | grep -q '.done' && echo "$filename is done".
I don't know how I can move the file to the folder when I don't have a folder name. Thanks for the help.