Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.76 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. for i in $(ls ./SDF_FAUX/Ligand*.sdf); do
  4.     #Je veux récupérer juste ce qu'il y'a dans l'asterisque, c'est un numéro,
  5.     #comment on cut tout le reste de manière efficiente ?
  6.     #(Genre sans cut, pipe etc...)
  7.     #num=`basename $i .sdf `
  8.     #echo $num
  9.     if (( $num<5 )); then #Ici aussi il refuse mes comparateur, genre les
  10.                            #symboles, de ce que j'avais lu pourtant (())
  11.                            #accepte les opérations
  12.         add=$((num+2))
  13.         cp ./SDF_FAUX/$i ./Ligand$add.sdf
  14.     elif (( $num<11 && $num>4 )); then
  15.         add=$((num+3))
  16.         cp ./SDF_FAUX/$i ./Ligand$add.sdf
  17.     elif (( $num<23 && $num>10 )); then
  18.         add=$((num+4))
  19.         cp ./SDF_FAUX/$i ./Ligand$add.sdf
  20.     elif (( $num>22 )); then
  21.         add=$((num+5))
  22.         cp ./SDF_FAUX/$i ./Ligand$add.sdf
  23.     fi
  24. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement