Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the previous activity you created several aliases and saved them to your ~ / . bashrc file. You may have noticed that creating long

In the previous activity you created several aliases and saved them to your ~/.bashrc file.
You may have noticed that creating long strings of commands can get a bit cumbersome when working on the command line.
Now, we will put our commands into a script file. Reading, writing, and running Bash scripts are a staple of any good sysadmin.
In this activity, you will create a script that completes several system audit steps automatically.
When completing this activity, consider the following:
Start by ensuring each command will give you the expected output before adding it to your script.
Some commands may not have been covered and require additional research.
Add all the commands listed in the instructions to your script.
Ensure the output of each command has a title like: The Memory Info is:
Change the permissions on your script to make it executable.
Run your script to verify it produces the correct output.
As a reminder, here are a few helpful environment and shell variables:
USER
HOME
SHELL
PWD
BASH
HOSTNAME
MACHTYPE
UID
Instructions
Complete the following set-up:
Create a new script file called sys_info.sh.
Change the permissions on the file to make it executable.
Open the file with nano.
Add a top hashbang line to make this a bash script.
Your script should output the following data:
A title and today's date.
The uname info for the machine.
The machine's IP address. (Narrow this output down to one line.)
The Hostname.
Run your script using ./ notation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago