Skip to content

Instantly share code, notes, and snippets.

@diphosphane

diphosphane/split_task.sh Secret

Created Jul 17, 2020
Embed
What would you like to do?
#!/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