User Tools

Site Tools


2018cmd_list

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2018cmd_list [2018/09/04 15:05]
david [Syntax]
2018cmd_list [2018/09/07 10:33] (current)
david [Syntax]
Line 2: Line 2:
  
 ====== A running list of BASH commands, syntax, and environmental variables ====== ====== A running list of BASH commands, syntax, and environmental variables ======
 +This page will be updated with new concepts for each lecture.
 +
  
 ===== Commands ===== ===== Commands =====
Line 35: Line 37:
  
  
-^ Keyword(s) ​     ^ Description ​ ^ Example ^ +^ Keyword(s)/​Operators ​     ^ Description ​ ^ Example ^ 
-| ''​[ ]'' ​            ​| conditional ​ | ''​[ -z ""​ ]'' ​ | +^  9/4/18 - Scripting, executable permissions/​conventions. ​                                  ||| 
-| ''​if,​then,​else,​fi''​ | flow control | ''​if [ -z ""​ ]; then echo '​empty!';​ else echo 'NOT empty!';​ fi''​ | +| ''​[ ]'' ​                  ​| conditional ​ | ''​[ -z ""​ ]'' ​ | 
-| ''​test'' ​           | flow control | ''​test -z ""''​ | +| ''​if,​then,​else,​fi'' ​      ​| flow control | ''​if [ -z ""​ ]; then echo '​empty!';​ else echo 'NOT empty!';​ fi''​ | 
-| ''&&​ ||'' ​      ​| boolean operators for flow control | ''​[ -z ""​ ] && echo '​empty!'​ || echo 'NOT empty!'''​ | +| ''​test'' ​                 | flow control | ''​test -z ""''​ | 
 +| ''&&​ ||'' ​                ​| boolean operators for flow control | ''​[ -z ""​ ] && echo '​empty!'​ || echo 'NOT empty!''' ​|  
 +^  9/​6/​18 ​                                                                       ||| 
 +| ''​let'' ​                  | arithmetic assignment ​ | ''​a=1;​ let a=a+1;''​ | 
 +| ''​$<​nowiki>​((expr))</​nowiki>'' ​            | arithmetic expressions | ''​echo <​nowiki>​$((a+1))</​nowiki>'' ​ |      
 +| ''​while'' ​                | loop           | ''<​nowiki>​a=0;​ while [ $a -lt 10 ]; do echo $a; let a=a+1; done</​nowiki>''​ |  
 +| ''​for var in list'' ​      | loop           | ''<​nowiki>​for num in 1 2 3; do echo $num; done</​nowiki>''​ | 
 +^  9/​11/​18 ​                                                                      |||
2018cmd_list.1536095138.txt.gz · Last modified: 2018/09/04 15:05 by david