answersLogoWhite

0

Still curious? Ask our experts.

Chat with our AI personalities

ProfessorProfessor
I will give you the most educated answer.
Chat with Professor
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
JudyJudy
Simplicity is my specialty.
Chat with Judy

Add your answer:

Earn +20 pts
Q: Shell program for calculating compound interest using for loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the Difference between c and shell program execution?

The shell interprets the script, while the C-compiler generates a binary executable.


How do you run daemon process?

In Unix, with a C program you can run a quick function to do this. There is an example at:(link moved to link section)AnswerIn Solaris, you need to disconnect your program from your "terminal" ( scripts generally inherit the stdin, stdout, and stderr of your shell when you execute them ). For a shell program you can execute "nohup $program < /dev/null > /dev/null 2>&1 &". Or the shell program can redirect its own stdin, stdout, and stderr -- then you can execute "nohup $program &".


Write a shell program to check and display 10 leap years?

dono


What is a basic shell c plus plus?

A basic shell program should essentially emulate a command prompt with a very limited set of commands, such as exit to close the shell and possibly cd to change the current directory. Shell's are typically used to spawn other processes, but a basic shell will typically limit which processes may be allowed to run.


When might it be necessary or advisable to write a shell script instead of a shell function?

A shell function will do nothing unless it is explicitly called by other code, typically in a shell script. A shell script is a runnable, executable process, which can call other shell scripts and/or functions. The question might be worded backwards - it is necessary to write shell functions for shell scripts when certain logical functionality is required to be performed multiple times. Consider a shell function equivalent to a program subroutine - they operate the same way.