1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#! /bin/bash
# SMILES strings with only one chiral mark are moved to the folder unoquir,
# separating them from those with more than one chiral mark. This separation
# is useful before applying racemiza1 (to the moved strings) or racemiza2
# (to the other)
[ -d unoquir ] || mkdir unoquir
for i in `ls *.smi`; do
dato=`cat $i`
dato=`echo $dato | sed -e s/@/x/`
echo $dato | grep -v @ >/dev/null && mv $i unoquir
echo $dato | grep -v @ >/dev/null || {
dato=`cat $i`
dato=`echo $dato | sed -e s/@@/x/`
echo $dato | grep -v @ >/dev/null && mv $i unoquir
}
done
|