#!/bin/bash mkdir -p ./bins/x86 ./bins/64 ./objs/x86 ./objs/64 ./libs/x86 ./libs/64 find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 32-bit' | grep 'relocatable' | cut -d: -f1| xargs -I{} mv {} ./objs/x86 find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 64-bit' | grep 'relocatable' | cut -d: -f1 | xargs -I{} mv {} ./objs/64 find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 32-bit' | grep 'shared' | cut -d: -f1 | xargs -I{} mv {} ./libs/x86 find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 64-bit' | grep 'shared' | cut -d: -f1 | xargs -I{} mv {} ./libs/64 find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 32-bit' | cut -d: -f1 | xargs -I{} mv {} ./bins/x86 find . -maxdepth 1 -type f -exec file {} \; | grep 'ELF 64-bit' | cut -d: -f1 | xargs -I{} mv {} ./bins/64