answersLogoWhite

0

a=10;

b=20;

c=`expr $a + $b`;

printf "$c";

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Write a shell script to show that user is logged in or not?

You don't need a shell script for that; use either 'whoami' or 'id'


How do you write shell scripting in UNIX?

A shell script is nothing more than a readable and executable ASCII text file. In this file you put all of the commands that you want to execute, in sequence. The name of the file can be anything you like. Any text editor (VI, VIM, pico, etc) can create a shell script file In addition, shell script files have the ability to detect logic, and are programmable. Just think about what tasks you want to perform and their order, and put it into a file, and there you have a shell script.


How do you write a shell script which counts the last 10 lines present in a given file?

You don't need a shell script to do this - just use the 'tail' command.


Shell script to find out the sum of first 10 natural numbers?

Yes


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.


How do you add two matrices using Linux shell script?

write ashell script to add awo matrix using array.


How do you write a shell script to enlist the processes being run?

#!/bin/sh PS -a


How do you write a statement in DOS using shell script to display a word?

We can not perform Shell Scripting in DOS, we can do Batch programing in DOS..


Shell script to find amstrong numbers within a given range?

Check below link


What is the command to execute a shell script?

If the shell script is readable and executable then to execute it just type the name of the shell script file. Otherwise, you can explicity call a shell interpreter to run the file as a shell script, i.e., ksh myfile


How do you write a script which lists the 10 Shell System variables?

You don't need a shell script to do that. Since you don't say what 10 shell variables you want, you can list them all by using the 'set' command to list all known in-use shell variables in the current session.


Write a shell script that counts a number of unique word contained in the alphabetical order line by line?

use python, shell is stupid