View Single Post
Old 03-06-2012, 01:18 PM   #67
JustAMan
Groupie
JustAMan doesn't litterJustAMan doesn't litter
 
JustAMan's Avatar
 
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
You can do it faster if you do
Quote:
find /mnt/us/documents -type d -mindepth 2 | grep -v "\.sdr$" | grep -v "^$" | grep -v "/mnt/us/documents/Gallery" | sed "s/^\/mnt\/us\/documents\///g" | sed "s/\//-/g" | while read dir; do
A bit fewer "greps". You'll have to check for yourself, though, I just wrote that code without checking it on the device.
JustAMan is offline