Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- for i in $(ls ./SDF_FAUX/Ligand*.sdf); do
- #Je veux récupérer juste ce qu'il y'a dans l'asterisque, c'est un numéro,
- #comment on cut tout le reste de manière efficiente ?
- #(Genre sans cut, pipe etc...), au pire je ferai avec mais je pensais qu'il y'avait moyen
- #num=`basename $i .sdf `
- #echo $num
- if (( $num<5 )); then #Ici aussi il refuse mes comparateur, genre les
- #symboles, de ce que j'avais lu pourtant (())
- #accepte les opérations
- add=$((num+2))
- cp ./SDF_FAUX/$i ./Ligand$add.sdf
- elif (( $num<11 && $num>4 )); then
- add=$((num+3))
- cp ./SDF_FAUX/$i ./Ligand$add.sdf
- elif (( $num<23 && $num>10 )); then
- add=$((num+4))
- cp ./SDF_FAUX/$i ./Ligand$add.sdf
- elif (( $num>22 )); then
- add=$((num+5))
- cp ./SDF_FAUX/$i ./Ligand$add.sdf
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement