The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Bash and Awk for creating directories and moving files
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Bash and Awk for creating directories and moving files
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
12
(
permalink
)
07-24-2008
Ygor
Moderator
Join Date: Oct 2003
Location: -31.96,115.84
Posts: 1,409
Try...
Code:
for i in *.jpg; do d=$(echo $i|cut -c-8|fold -2|paste -s -d /); mkdir -p $d; mv $i $d; done
Ygor
View Public Profile
Find all posts by Ygor
Find Ygor's past nominations received
Find Ygor's present nominations given