Answer Posted / pitambar mishra
### Note : Function always returns a value.
### This script is for adding two numbers.
### Script name : add.ksh
#!/bin/ksh
sum() ### Defining sum function
{
echo enter 2 no :
read num1 num2
echo sum=$(( num1 + num2 ))
}
sum ### Invoking sum function
To execute it :
ksh add.ksh
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is info area how many types?
Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.
How can you find out how long the system has been running?
is this growing field and what is average package in this?
Write a command sequence to find the count of each word?
What is sh in shell script?
How do I run a script on mac?
What is the conditional statement in shell scripting?
write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.
What are zombie processes?
What is the best shell scripting language?
What language is used in terminal?
What is awk in shell script?
How to write a function?
How does path variable work?