Open main menu

CDOT Wiki β

Changes

OPS235 Lab 2 - CentOS7

3 bytes added, 10:12, 2 April 2015
no edit summary
|- valign="top"
|
{{Admon/tip|Bash Shell Scripting Tips:|<br><ul><li>'''Data Input:'''<br><br>x<br><br></li><li>'''Mathematical Expressions:'''<br><br><li>'''Loops (iteration):'''<br><br>x<br><br>'''<u>Examples (try in a shell script)</u>'''<br><br>''set ops235 is fun''<br>''for x''<br>''do''<br>&nbsp;''echo "argument is $x"''<br>''done''<br><br>''for ((x=10;x>&gt;=1; x--)''<br>''do''<br>&nbsp;''echo "countdown: $x"''<br>''done''<br><br>'''if [ $grade -gt 79 ]'''<br>'''then'''<br>&nbsp;'''echo "You get Good Mark"'''<br>'''elif [ $grade -gt 49 ]'''<br>'''then'''<br>&nbsp;'''echo "You pass"'''<br>'''else'''<br>&nbsp;'''echo "You fail"'''<br>'''fi'''<br><br></li><li>'''Loops and Testing'''<br><br>x<br>. </li></ul>}}
|}
13,420
edits