1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sedaia [141]
3 years ago
6

Write a bash script HW4p2.sh to print out the list of numbers between 0 to 100 (including 0 and 100) that are divisible by both

3 and 5. You must create a bash function inside the script to check the divisibility by 3 and 5.
Computers and Technology
1 answer:
ratelena [41]3 years ago
8 0

Answer:

#!/bin/bash

function number_div( ) {

   for i in {0. .100};

   do

   if (( $i % 3 == 0 ))

   then

   echo $i

   elif (( $i % 5 == 0 ))

   then

   echo $i

   else

   echo "Number not divisible by 3 and 5"

   fi;

   done

}

number_div( )

Explanation:

The bash script is saved as "HW4p2.sh" and executed as "./HW4p2.sh". This code would print all and only numbers divisible by 3 or 5.

You might be interested in
What are three ways digital identity is created and kept up? (open answer)
Anna007 [38]

Answer:

Capture attributes as ID documents or biometric data

Explanation:

Examples of such attributes include biometrics, verified identification documents, and third-party verification procedures. To create a trusted digital ID, there are typically three steps: capturing verified attributes, verification of the documents, and digitization of the ID.

Great day :) toodles

6 0
2 years ago
The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predica
baherus [9]

Answer:

1. Where,

2. From

Explanation:

In SQL query language when working on a database, a user can use certain clauses to carry out some functions.

Hence, The WHERE clause allows us to select only those rows in the result relation of the FROM clause that satisfy a specified predicate.

This is because the "Where clause" selects the rows on a particular condition. While the "From clause" gives the relation which involves the operation.

5 0
3 years ago
4. What is the difference between portrait orientation and landscape orientation? (1.0 points)
Bezzdna [24]

Answer:

Portrait orientation is taller then it is wide, while landscape orientation is wider then it is tall.

Explanation:

3 0
3 years ago
In 2016, NIST published a new Federal Master Cybersecurity Framework to create a mandatory framework for managing cybersecurity
ICE Princess25 [194]

Answer:

In 2014, NIST published a new Federal Master Cybersecurity Framework for managing cyber risk for the delivery of critical services. So the correct answer is False.

Explanation:

NIST published the Federal Master Cybersecurity Framework to managing risk for the delivery of critical services. The U.S. issued Framework on February 12, 2014.

8 0
3 years ago
Which Windows utilities are used to create previous versions of files that can be recovered from the file properties dialog box?
pochemuha

Answer:

File History utility and System Protection utility for windows 8;

And then Backup and Restore utility and System Protection utility for windows 7.

6 0
3 years ago
Other questions:
  • Which computer device works like the human central nervous system by connecting all the computer’s parts together and allowing t
    9·1 answer
  • What are some consequences of internet addiction​
    9·1 answer
  • GoInternet, Inc., is an Internet-access service provider that is being forced to manage numerous unwanted e-mail messages from a
    10·1 answer
  • Cyberlaw consists of: a. only state statutes. b. only federal statutes. c. traditional legal principles that have changed becaus
    6·1 answer
  • Which of these describes the functionality of a database? Check all of the boxes that apply.
    10·2 answers
  • One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
    12·2 answers
  • - Consider the relation R = {A, B, C, D, E, F, G, H, I, J} and the set of functional dependencies F = { {B, C} -> {D}, {B} -&
    14·1 answer
  • How is the bootstrap program started?
    6·2 answers
  • Any my hero academia fans out there don't report at all just what more friends to
    14·2 answers
  • Which program assesses and measures improper medicare fee-for-service payments (based on reviewing selected claims and associate
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!