On 11/30/2015 04:49 PM, Robert Moskowitz wrote:
You could:
 mv "$file" "$file-$(stat -c %y "$file")"

Not quite as the script:

#!/bin/bash
for i in `seq 20 42`;
     do
         file="Voice "0${i}.m4a
         mv $file "$file-$(stat -c %y "$file")"
     done

is producing:

mv: target ‘Voice 036.m4a-2015-05-07 06:51:59.000000000 -0400’ is not a
directory

That's why I quoted "$file" in both instances.

Your file name has a space in it, so the command you ran is:

"mv" "Voice" "036.m4a" "Voice 036.m4a-2015-05-07 06:51:59.000000000 -0400"

And since "mv" got 3 arguments, it requires that the last one is a directory.

If you had quoted "$file" after mv, it should have worked properly.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to