-2

I am using a script made by one of my former colleagues, he told me I'll need some working with it. I am wondering what this while loop does:

# This is the loop that does the simulation
lastsim=0
nextsim=`/usr/bin/expr $lastsim + 1`

while [ $nextsim -le $upperlimit ]
do

  cp -i Dynamics_${lastsim}_500ps/*.prmtop ./$paramInput.prmtop

specifically I'm confused by thie -le syntax This is only part of the script I can upload the rest if necessary.

DS-V
  • 123
  • 1
  • 1
  • 7

1 Answers1

3

-le means less or equal to. See the following example which would print 0-9:

i=0
while [ $i -le 9 ]; do
  echo $i
  let i++
done