View Single Post
Old 03-06-2012, 05:03 PM   #69
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
3 remarks:

1. the two sed commands can be combined into one: ... |sed -e "s/^\/mnt\/us\/documents\///g" -e "s/\//-/g" | grep ...
2. your second-last grep is wrong. Should probably be "\-Gallery", not "\Gallery". \G is not a valid escape code
3. Your last grep is probably useless: you already replaced /mnt/us/documents by "", so there are no occurrences of -mnt-us-documents

"Probably" everywhere because I also didn't test it

Last edited by ixtab; 03-06-2012 at 05:07 PM.
ixtab is offline