Skip to content

Instantly share code, notes, and snippets.

@el3ment
Last active May 3, 2017 18:42
Show Gist options
  • Save el3ment/3720bc1002090f851840ac62a82d43ea to your computer and use it in GitHub Desktop.
Save el3ment/3720bc1002090f851840ac62a82d43ea to your computer and use it in GitHub Desktop.
#!/bin/bash
rm ChairsSDHom_release_TRAIN.list ChairsSDHom_release_TEST.list 2> /dev/null
cd ./data/train
paste -d ' ' <(awk -v d="${PWD}" '{printf d;printf "/t0/";print;}' <(ls t0 -1)) <(awk -v d="${PWD}" '{printf d;printf "/t1/";print;}' <(ls t1 -1)) <(awk -v d="${PWD}" '{printf d;printf "/";print;}' <(ls flow/*.flo -1)) > ChairsSDHom_release_TRAIN.list
mv ChairsSDHom_release_TRAIN.list ../../
cd ../../data/test
paste -d ' ' <(awk -v d="${PWD}" '{printf d;printf "/t0/";print;}' <(ls t0 -1)) <(awk -v d="${PWD}" '{printf d;printf "/t1/";print;}' <(ls t1 -1)) <(awk -v d="${PWD}" '{printf d;printf "/";print;}' <(ls flow/*.flo -1)) > ChairsSDHom_release_TEST.list
mv ChairsSDHom_release_TEST.list ../../
cd ../../
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment