forked from jasonrohrer/OneLifeData7
-
Notifications
You must be signed in to change notification settings - Fork 1
/
usefulFilters.txt
29 lines (10 loc) · 847 Bytes
/
usefulFilters.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Print grep results in numerical order on filenames:
grep blah $(ls -1v objects/*)
Print names of objects that have pixHeight > 64:
grep pixHeight $(ls -1v objects/*) | tr '=' ' ' | tr ':' ' ' | awk '$3>64{print $1 }' | xargs awk 'FNR == 2'
Print names of objects that block walking:
grep blocksWalking=1 $(ls -1v objects/*) | tr ':' ' ' | awk '{print $1 }' | xargs awk 'FNR == 2'
Print non-blocking objects that have pixHeight > 64:
grep pixHeight $(ls -1v objects/*) | tr '=' ' ' | tr ':' ' ' | awk '$3>64{print $1 }' | xargs grep "blocksWalking=0" | tr ':' ' ' | awk '{print $1 }' | xargs awk 'FNR == 2'
Print blocking objects that have pixHeight < 64:
grep pixHeight $(ls -1v objects/*) | tr '=' ' ' | tr ':' ' ' | awk '$3<64{print $1 }' | xargs grep "blocksWalking=1" | tr ':' ' ' | awk '{print $1 }' | xargs awk 'FNR == 2'