RANDOM stuff

8 views
Skip to first unread message

Kevin Kangik Cho

unread,
Dec 17, 2012, 5:14:52 PM12/17/12
to linux-f...@googlegroups.com
Guess what this does.

for i in *
do
ls $i
/*/*|grep DTI|awk -F ':' '{print $1}'
done


































for i in *
do

ls $i/*/*|grep DTI|awk -F ':' '{print $1}'

done

1. show everything in all folders to the third level      ls $i/*/*
2. show only folder or files which have 'DTI' in its name     grep DTI
3. cut the sentence with ':' and print the pre ':' part    awk -F ':' '{print $i}'




Think about it. And forget about it.
Good day.



Reply all
Reply to author
Forward
0 new messages