Changes

Jump to: navigation, search

OPS235 Lab 6 - CentOS7 - SSD

23 bytes removed, 06:42, 15 June 2016
no edit summary
#Confirm that each host can ping all three of the other hosts by name.
 
===Part 2: Using a Shell script (using Arrays) to Collect VM Network Information===
{|width="40%" align="right" cellpadding="10"
|- valign="top"
</li></ul>'''<u>Working with Temporary Files</u>'''<br><br><ul><li>When creating temporary files, it is important NOT to store on a user's account (to avoid overwriting their existing files). Instead, temporary files can be created in the '''/tmp''' directory.<br><br></li><li>The $$ variable can be used as the filename extension which assigns the current PID of the shell script running to make the filename unique, and allow easy removal at the end of the shell script by deleting ALL files in the /tmp directory with the extension: .$$<br><br></li><li>Example:<br><br>''ls -lR &gt; /tmp/temp-file.$$''<br>''grep secret /tmp/temp-file.$$''<br>''rm /tmp.$$''<br></li></ul> }}
|}
===Part 2: Using Arrays to Collect VM Network Information===
 
We finish shell scripting by using arrays by reading and storing networking information for each VM (centos1, centos2, and centos3) to be stored in a report in your c7host machine. We will use the ssh command in order to grab the network information (one VM at a time), and store the network setup into an Associative array in our c7host machine.
13,420
edits

Navigation menu