Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program 1 : Suppose we have a file called protocols.txt including three columns. The first one cont ains the name of the protocol, the second
Program :
Suppose we have a file called protocols.txt including three columns. The first one cont ains the name of the protocol, the second one contains the input dat a flow and the third one contains the output dat a flow. The file could be shown as follows:
tabletcpudpftpsmtpsmb
The fields are separated by spaces or Tabs.
a The program should display a menu to choose between Input and Output flow
b A test should be carried out whether the choice is for Input data flow or for output dat a flow
c A loop should verify that the given value is or
d A command should display the protocol name and the input or output dat a flow with respect to the given choice
e The output of the command should be given in a loop to read line by line
f Test whether the line is empty. In this case the loop should end
g Store the readed value in the positional par ameters
h Display the data flow in form of ##### where each # symbol corresponds to the value
Program : Write a program which displays the users and their UID in form of a table. Only those having a UID greater or equal a given positional par ameter should be given.
The program should
a Test whether a position parameter is given
b write the command which display the users and UID separated by a space and enter the output to a while loop
c read the output of the executed command line by line
d put the line in the set of positional parameters $@
e test whether the UID is greather than the desired Value and display them in case of true.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started