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:08]
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 41: Line 43:
 | ''​test'' ​                 | flow control | ''​test -z ""''​ | | ''​test'' ​                 | flow control | ''​test -z ""''​ |
 | ''&&​ ||'' ​                | boolean operators for flow control | ''​[ -z ""​ ] && echo '​empty!'​ || echo 'NOT empty!'''​ |  | ''&&​ ||'' ​                | 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.1536095306.txt.gz ยท Last modified: 2018/09/04 15:08 by david