Changes

Jump to: navigation, search

OPS235 Lab 4 - CentOS7

9 bytes added, 10:02, 29 April 2015
no edit summary
&nbsp; &nbsp; &nbsp; &nbsp; exit 1 ;;<br>
&nbsp;esac<br>
done<br>
</code>
<ol><li value="6">Save your editing session, but remain in the text editor.</li><li>The code displayed below uses logic to exit the script if the input file does not exist. Command substitution is used to store each line of the input file as a positional parameter. There is one subtle problem here: The full names of the users contain spaces which can create havoc when trying to set each line as a separate positional parameter. In this case the sed command is used to convert spaces to plus signs (+), which will be converted back later. Finally, a '''for''' loop is used to create each account ('''useradd''') and mail the user their account information ('''mail'''). Add the following code:</li></ol>
13,420
edits

Navigation menu