Skip to content

Instantly share code, notes, and snippets.

@diphosphane
Created July 17, 2020 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diphosphane/9e91a45c14dbd3da034076e792e04f37 to your computer and use it in GitHub Desktop.
Save diphosphane/9e91a45c14dbd3da034076e792e04f37 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
cwd=`pwd`
for i in `seq 1 101`; do
cd $cwd
mkdir $i
cp *.com $i
cp *.dat $i
cp *.py $i
cp *.bsub $i
cd $i
s=$((($i-1)*500+1))
e=$(($i*500))
sed -n $s','$e'p' ../itrain.dat > itrain.dat
sed -i 's/multi-g/multi-'$i'/g' multi-gaussian.bsub
bsub < multi-gaussian.bsub
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment