Skip to content

Instantly share code, notes, and snippets.

@avishekrk
Last active January 27, 2016 23:05
Show Gist options
  • Save avishekrk/3276f097d8a4b56a0778 to your computer and use it in GitHub Desktop.
Save avishekrk/3276f097d8a4b56a0778 to your computer and use it in GitHub Desktop.
Loop through directories run script
#!/bin/bash
mkdir -vp 1fsa_ppsy_i{20,40,60}c1ka5
ls -F | grep "^1fsa.*/$" | while read f;
do
f3=$(echo $f| cut -d_ -f3);
num=${f3:1:2};
echo $num;
fname="peturbed_${num}_input_xxx.pdb";
echo $fname;
cd $f;
pwd;
#run-script here.
cd ..;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment