Skip to content

Instantly share code, notes, and snippets.

@cemysf
Created July 26, 2020 21:47
Show Gist options
  • Select an option

  • Save cemysf/3bb7655816805248916d734a9818eecf to your computer and use it in GitHub Desktop.

Select an option

Save cemysf/3bb7655816805248916d734a9818eecf to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
###
### usage: bash run_intron.sh N
### N: number of runs
###
cp intron_orig.py intron.py
i=0
while [ $i -lt $1 ]
do
## Give itself as input, append result to itself
python intron.py < intron.py >> intron.py
## Only keep the last line
echo "$(tail -n 1 intron.py)" > intron.py
i=$[$i+1]
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment