Open main menu

CDOT Wiki β

Changes

OPS235 Lab 4 - CentOS7

69 bytes added, 19:56, 10 April 2015
no edit summary
<ol><li value="3">Open a Bash shell terminal and login as root.</li><li>Use the wget command to download the input file called user-data.txt</li><li>View the contents on the user-data.txt file to confirm there are 3 fields (username, fullname, and e-mail address).<li><li>Use a text editor (such as <b><code><span style="color:#3366CC;font-size:1.2em;">vi</span></code></b> or <b><code><span style="color:#3366CC;font-size:1.2em;">nano</span></code></b>) to create a Bash Shell script called: <b><code><span style="color:#3366CC;font-size:1.2em;">createUsers.bash</span></code></b> in /root's home directory.</li><li>Enter the following text content into your text-editing session:</li></ol>
<code style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;">
<br>
</code>
<br>
<ol><li value="6">Save your editing session, but remain in the text editor.</li><li>The code displayed below uses a trick (called a "flag") to check if the user provided an input file pathname (which is absolutely necessary). The getopt function is also used to set variable (and a flag) based on the input file pathname or check for invalid options that the issuer of the command usedor missing option text. Add the following code</li></ol>
<br>
<code style="color:#3366CC;font-family:courier;font-size:.9em;">
13,420
edits