How can I separate the path and file elements in a bash loop like this?
for file in `find /my/path -name "*.ext"`
do
#(path,onlyfile) = separate_path_and_file $file
#dosomethingwith $onlyfile
done
bashlinuxpath
How can I separate the path and file elements in a bash loop like this?
for file in `find /my/path -name "*.ext"`
do
#(path,onlyfile) = separate_path_and_file $file
#dosomethingwith $onlyfile
done
Best Answer
You can't. But you can do them separately.