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
Rashid [163]
3 years ago
15

List two items that are required to make a text file into a bash script.

Computers and Technology
1 answer:
Olenka [21]3 years ago
6 0

Answer:

Explanation:

First a header is needed indicating which bash will be used (sh, zsh, bash, etc.), then it is necessary to change the file extension so that the system recognizes it as an executable file and no longer as text

You might be interested in
A day has 86,400 secs (24*60*60). Given a number in the range 1 to 86,400, output the current time as hours, minutes, and second
stellarik [79]

Answer:

Here it the C++ program:

#include <iostream> //to use input output functions in the program

using namespace std; // to identify objects like cin, cout

int main() { //start of the body of main() function

   int time = 0; // time entered by the user

   int hour = 0; // to hold the value of hours

   int min = 0; //to hold the value of minutes

   int sec = 0; // to hold the value of seconds

   int remaining_time=0; // holds value of remaining time while conversion

cout << "Enter a time in seconds: "; //Prompts user to enter time in secs

cin >> time; //reads the value of time entered by the use

hour = time/3600; //divides the input time to 3600 to convert in hours

remaining_time = time%3600; // to calculate remaining time

min = remaining_time/60; // divides remaining time with 60 to get mins

remaining_time = remaining_time%60;

/* computes remaining time after converting the previous remaining time to minutes. */

       sec = remaining_time; // computes no of seconds

// time entered by user should be within this range

     if(time>=1 && time<=86400)

/*when if condition is true it displays the input seconds to hours minutes and seconds */

{cout<<"\nThe time is: "<<hour<<" hours, " <<min<<" minutes, and "<<sec<<" seconds\n"; }

else //when if condition evaluates to false

cout<<"Out of range";  } //displays out of range message

Explanation:

Everything is briefly explained in the comments given within the program.

The logic of this program is explained below.

Lets see how the given example works with this program. Suppose the user enters 96500. The message out of range is displayed as this value exceeds the range 1 to 86400.

Suppose user enters 70000. If condition evaluates to true. So this number is converted into hours, minutes as seconds as following:

To calculate hours this formula is used

                          hour = time/3600;

                                   = 70000/3600

                                   = 19

So the value of hour=19

Now the remaining_time variable works as a temporary variable to hold the remaining input after calculation of each conversion.

So after conversion to hour the remaining_time value is calculated as:

                         remaining_time = time%3600;

                                                    = 70000%3600

                                                    = 1600

mod here finds the remainder after conversion to hours as 70000/3600 has quotient 19 and remainder 1600.

Now the value of minutes is computed by this remaining time (value stored in remaining_time).

                       min = remaining_time/60;

                                     = 1600/60

                                     = 26

So the value of minutes is 26

Lets calculate remaining time:

                    remaining_time = remaining_time%60;

                                               = 1600%60

                                               = 40

Now the new value stored in remaining_time is 40

Now lets find the value of seconds:

                      sec = remaining_time;

                             = 40

As the new value of remaining_time is 40 so seconds=40

Finally the following message is displayed in output:

The time is: 19 hours, 26 minutes, and 40 seconds

5 0
2 years ago
Can u guys tell me what is the definition of umbra​
oksian1 [2.3K]

Answer:

the fully shaded inner region of a shadow cast by an opaque object, especially the area on the earth or moon experiencing the total phase of an eclipse.

Explanation:

i go.ogled it

5 0
2 years ago
Read 2 more answers
The act of deliberately accessing computer systems and networks without authorization is generally known as _____.
Anuta_ua [19.1K]

it is known as hacking

3 0
2 years ago
.Like a loop, a recursive method must have some way to control the number of times it repeats itself? (true, false)
Nataly_w [17]

Answer:

True.

Explanation:

In a recursive method, method call itself.If there is no control statement then it will call itself for infinite time.To prevent this we need to create a base/ termination  condition in the recursive method. So that when it meets the base/termination condition, method will stop calling itself.

Here is an example of controlled recursive method :

void dig(int n)

{

// base condition to stop calling itself

  if(n==0)

  return;

 

  else

   {

       cout<<n%10<<" ";

       // function will itself until it meets the base condition

       // recursive call

       rdig(n/10);

   }

}

this method to print the digits of a number in revers order.first it will  print the last digit and update the number as num/10. this will repeat until num become 0. When it reaches the base condition it will stop calling itself and returned.

3 0
3 years ago
What does software such as Bendix ACom allow the technician to perform on an ABS circuit?
denis-greek [22]
It allows the technician to modify it
5 0
3 years ago
Other questions:
  • How do open online courses help with independent learning? (1 point)
    13·2 answers
  • Narrow margins are helpful for which task?
    6·1 answer
  • cellPhoneBill(m,tx)Write the function cellPhoneBill()that takes two int m and txas input and returns a float.The function takes
    11·1 answer
  • The icon below represents the ____________.
    8·1 answer
  • In excel, which symbol means not equal to when comparing two values?
    15·1 answer
  • If you increase the distance between two magnets, what will happen?
    15·2 answers
  • Write a statement that compares the values of score1 and score2 and takes the following actions. When score1 exceeds score2, the
    7·1 answer
  • What is the first priority when building or using vex robots
    10·2 answers
  • What is the use of consonant in QBASIC ? Answer me in short and easy answer.​
    14·1 answer
  • Tgif
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!