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
Dvinal [7]
3 years ago
13

Write a shell script called SpellOutDate that prints the detail of the current date in separate lines. For example if the curren

t date on the system is Thu Jan 30 10:57:20 CST 2020 Then when you run your script as: $ SpellOutDate Then the output should be: Time: 10:57:20 Today is: Thursday Day of the month: 30 Month: January Year: 2020
Computers and Technology
1 answer:
AlladinOne [14]3 years ago
6 0

Answer:

Hi there! We can use the "date" function and formats available to us along with the "echo"command to print the date in the format required in the question. Please see below for the details.  

Explanation:

SpellOutDate.sh

#!/bin/bash

echo "Time: $(date +'%T')"

echo "Today is: $(date +'%A')"

echo "Day of Month: $(date +'%u')"

echo "Month: $(date +'%B')"

echo "Year: $(date +'%G')"

running from the command line, the code will produce the results as:

./SpellOutDate.sh

Time: 11:12:53

Today is: Monday

Day of Month: 1

Month: March

Year: 2020

You might be interested in
For the following 4-bit operation, assuming these register are ONLY 4-bits in size, which status flags are on after performing t
m_a_m_a [10]

Answer:

All flags are On ( c, z , N  )

Explanation:

Given data:

4-bit operation

Assuming 2's complement representation

<u>Determine status flags that are on after performing </u> 1010+0110

    1   1

    1  0   1  0

    0  1   1  0

  1  0 0 0 0

we will carry bit = 1 over

hence C = 1

given that: carry in = carry out there will be zero ( 0 ) overflow

hence V = 0

also Z = 1      

But the most significant bit is  N = 1

8 0
2 years ago
Dynamic programming does not work if the subproblems: ___________
nirvana33 [79]

Answer:

A. Share resources and thus are not independent

Explanation:

This would be the answer. If this is wrong plz let me know

6 0
2 years ago
Given the following function definition
siniylev [52]

Answer:

B. 1 6 3

Explanation:

Given function definition for calc:

void calc (int a, int& b)

{

int c;

c = a + 2;

a = a * 3;

b = c + a;

}

Function invocation:

x = 1;

y = 2;

z = 3;

calc(x, y);

cout << x << " " << y << " " << z << endl;

  • Since x is passed by value, its value remains 1.
  • y is passed by reference to the function calc(x,y);

Tracing the function execution:

c=3

a=3

b=c+a = 6;

But b actually corresponds to y. So y=6 after function call.

  • Since z is not involved in function call, its value remain 3.

So output: 1 6 3

3 0
3 years ago
The keywords used in programming languages that use decisions to redirect the flow of a program are called __
olchik [2.2K]
The keywords used in programming languages that use decisions to redirect the flow of a program are called control structures.
6 0
3 years ago
In the LC-3, how many memory words are used to store the string "rainbow"?
oksian1 [2.3K]
The number of memory words used to store the string "rainbow" is 8.
5 0
3 years ago
Other questions:
  • In which area of engineering does material selection play a vital role a design optimization b forensic engineering c mechanical
    6·1 answer
  • In steps<br> Urgent please
    14·1 answer
  • I'll pay 50 dollars to anyone who can do this leave your snap after answering doing it and ill cash app it
    13·1 answer
  • Using an LCD projector to show an online video to a group of people is an example of:
    14·1 answer
  • Select the correct answer.
    11·1 answer
  • Why Embedded operating systems are also known as real-time operating systems (RTOS)?
    15·1 answer
  • How do I keep my computer and data safe and secure while using the Internet?
    14·2 answers
  • Maria is creating a program where the user will enter their name to begin. What kind of variable should be used for the user’s n
    15·2 answers
  • JAVA CODE.
    6·1 answer
  • given 2,4,3,-1 as input, what is the output for the following program:total_product = 1 user_value = int(input()) while user_val
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!