Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP THIS QUESTIONS, WOULD LOVE IT TYPED. Q1. Write a game entirely in shell script which generates an unknown number and prompts the player

PLEASE HELP THIS QUESTIONS, WOULD LOVE IT TYPED.

Q1.

Write a game entirely in shell script which generates an unknown number and prompts the player to enter a number. Your game should receive the number and compare it to the generated number, let your game tell the player whether the number entered is higher than or lower than the hidden number until the player is able guess the number or quit the game, upon guessing the right number the game should congratulate the player for winning and tell the player how many attempts were made before guessing the right number.

Write a shell script that uses a function to count the number of files in the present working directory and output their number to the screen.

Explain with examples how to make variables available to child processes/shells

Many beginners are confused about the difference between the working of touch and of cat, could you please make the difference clear with an example.

Q2.

A) The AIT canteen wants you to write a script for them which would do the following

I) receive records from the user and keep these records into a file, the records must include

ID

Name of meal

Price of meal

Quantity bought today

Sales made for the day

Today the sales person wants to make seven entries into the file via the command line interface.

Your script should be able to find to present the sales person with the ability to

Search for a particular meal by ID

Search for a particular meal by name

find out how much money has been made from the sales of a particular meal

list all records

list all meals and their prices

list a particular meal and its price

B) With a shell script explain how to use case

C) With code explain how the following work

if statements

if else statements

if elif else fi statements

D) Explain the difference between= grep -i "some string" some file and

grep -iw "some string" some file

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

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions