0

I need help writing a script called stats, which provides the user with useful information about the status of their system. The user should run this by typing stats at the command prompt. The output should be displayed immediately on stdout . Anyone able to help me?

3
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by L7Sqr
0

Not if you can't demonstrate the slightest bit of effort on your own.

What do you have so far? What specific questions do you have?

0

i also have another question -
Write a script called area which takes two numerical arguments representing the base length and height of a right-angled triangle, plus one or two options, -a, and –h meaning area and help.
Wiih option –a, the area of the triangle should be displayed on standard output preceded by the message ‘Area is: . With option –h, a short help message should be displayed. With no options there should be no output. Any other option should be ignored except that a warning ‘invalid option’ should be output.

0

for that one, i have the following so far -

echo –n “Enter base of a triangle : ”
read b
echo –n “Enter height of a triangle : ”
read h
area = $ (echo “scale=2; (1/2) * $b * $h |bc)
echo “Area of a triangle is $area”

how would i incorporate the - a and - h features?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.