-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall.sh
9 lines (9 loc) · 1020 Bytes
/
all.sh
1
2
3
4
5
6
7
8
9
ls | xargs -i bash -c 'head -1 {} | grep -c "Backtracking" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../backtracking/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "String" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../string/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Dynamic Programming" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../dynamic_programming/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Linked List" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../linked_list/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Tree" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../tree/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Hash Table" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../hash_table/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Bit Manipulation" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../bit_manipulation/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Math" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../math/`'
ls | xargs -i bash -c 'head -1 {} | grep -c "Graph" &> /dev/null; [[ $? -eq 0 ]] && `mv {} ../graph/`'