" mv * dir " doesn't work in a script?

Posted by Anxo on Stack Overflow See other posts from Stack Overflow or by Anxo
Published on 2010-05-28T15:33:26Z Indexed on 2010/05/28 15:41 UTC
Read the original article Hit count: 141

Filed under:
|

I want to move all the files to a new dir. From the command line I can do "mv . newdir" but if I try with this script:

#!/bin/bash -f
#
mkdir newdir
mv *.* newdir

I get the following message: "mv: rename . to newdir/.: No such file or directory"

© Stack Overflow or respective owner

Related posts about bash

Related posts about scripts