Changes

Jump to: navigation, search

OPS235 Lab 1 - CentOS7

10 bytes removed, 14:50, 1 April 2015
no edit summary
# Enter the following text content into your text-editing session:
<code style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;">
::&#35;!/bin/bash # Forces script to run in the bash shell<br><br>::::::&#35; Author: *** INSERT YOUR NAME ***<br>::&#35; Date: *** CURRENT DATE ***<br>::&#35;<br>::&#35; Purpose: Creates system info report<br>::&#35;<br>&#35; USAGE: ./report.bash<br><br><br>::::::if [ $USER != "root" ] # only runs if logged in as root<br>::then<br>&nbsp;echo "You must be logged in as root." >&2<br>::&nbsp;exit 1<br>::fi<br></code>
<ol><li value="4">Save your editing session, assign your report.bash file read and execute permissions (at least for the owner) and run by typing: <b><code><span style="color:#3366CC;font-size:1.2em;">./report.bash</span></code></b></li><li>Did it run? If not what do you think you need to do in order to run the Bash Shell Script?</li><li>Issue the command <b><code><span style="color:#3366CC;font-size:1.2em;">su</span></code></b> and run the Bash shell again. Did it work?</li><li>Reopen your text-editing session for report.bash and add the following lines of code to the bottom of the shell script file:</ol>
13,420
edits

Navigation menu