Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Notepad, select File New rightarrow New to start a new file. Enter the follow

ID: 3825108 • Letter: I

Question

In Notepad, select File New rightarrow New to start a new file. Enter the following instructions. Save the file as startup. Bat. echo System Report Follows: ver echo Date and Time: date/T time/T hostname set NAME=your full name echo Establishing new environment variable NAME=%NAME% ipconfig path The/T after date and time force these two instructions to output the date and time without prompting should be changed. Use your first and last name in the set Name instruction with a space between them. Run your script. You will notice that there is too much text to fit on one screen, so you have to scroll up to read the full output. Notice as the program runs, each instruction is output and then the results are output. We do not want to see the actual instructions. To "hide" them, add as the first instruction in this script @echo off. Save the file and rerun it. Look at the output. What does ver do? What does hostname do? What does path do? b. With echo off, we do not see the actual instructions as they execute, only their output. And yet it would be helpful to know something about what we are seeing such as "Your PATH variable is currently storing;" before we see the output to path. Add echo statements to precede the hostname and path instructions. Save and rerun your script. Another instruction worth using is cls, which clears the screen. Add this instruction immediately after echo off, save and run your script. Another useful instruction pause, which pauses the output so that it doesn't scroll off the screen. Insert a pause instruction at an appropriate place in your script. Save and run your script. When you have satisfactorily fixed your script as described in this step, save your revised script to your answer file in response to this step. Start a new notepad file and enter the following. Add two blanks after the number in both set instructions. @echo off set/p = Enter a number set/p y = Enter a second number if %x% gtr %y% (echo %x% is greater than %y%) else (echo %y% is greater than or equal to %x%)

Explanation / Answer

Answer for b :

create a file called "startup.bat" using the command

vi startup.bat (this opens a new vi editor with startup.bat name)

code :

#!/bin/bash   
clear   
@Echo off   
echo System Report Follows:   
ver   
echo Date and Time
date /T   
time /T   
pause   
echo hostname   
hostname
set NAME=Jon
echo Establishing new environment variable NAME=%NAME%
ipconfig
echo path   
path

Compiling proces :

compile the above code using "./startup.bat" directly in the terminal

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote