Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleStart an idev session
idev -p developmentnormal -m 60 -A UT-2015-05-18 -N 1 -n 68 --reservation=BIO_DATA_week_1

...

Tip

The bash shell lets you put multiple commands on one line if they are each separated by a semicolon ( ; ). So in the above for loop, you can see that bash consideres considers the do keyword to start a separate command. Two alternate ways of writing the loop are:

Code Block
languagebash
# One line for each clause, no semicolons
for <variable name> in <expression>
do 
  <something>
  <something else>
done
Code Block
languagebash
# All on one line, with semicolons separating clauses
for <variable name> in <expression>; do <something>; <something else>; done

...