Open main menu

CDOT Wiki β

Changes

OPS235 Lab 2 - CentOS7

2 bytes removed, 15:26, 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><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 in $(ls)''<br>''do''<br> &nbsp;''echo "Filename: $x"''<br>''done''<br><br>''read -p "enter a whole number: " num''<br>''until echo $num &#124; grep -q "^[0-9][0-9]*$"''<br>''do''<br> &nbsp;'''read -p "Incorrect. Please enter WHOLE NUMBER: " num'''<br>''done''<br><br></li></ul>}}
|}
13,420
edits