Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Create a new script named ifcommand.sh that accepts a username as input and checks to see if that user is logged in. If the

1. Create a new script named ifcommand.sh that accepts a username as input and checks to see if that user is logged in. If the user is logged in, print "yes", otherwise print "no"

Example;

cjingers@general:~$ ./ifcommand.sh cjingers yes

2. Create a new script with the name ifnumberic.sh that accomplishes the following tasks;

- Prompt the user to enter a number between 0 and 9 - check that the provided input is a number between 0 and 9 - If the number is greater than 9, print "invalid entry" - IF the users number is greater than 5; print; - Your number is greater than 5 - IF the users number is less than 5, print; - Your number is less than 5 - IF the users number is exactly 5, print; - Your number is 5 Example

cjingers@general:~$ ./ifnumbers.sh Please enter a number between 0-9: 8 Your number is greater than 5

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions