0% found this document useful (0 votes)
65 views

Linux Shell Example

This document prompts the user to input a distance between two cities in kilometers, then calculates and displays that distance converted to meters by multiplying the kilometers by 1000, and finally displays the distance in centimeters by multiplying the meters by 100.

Uploaded by

VedasEverywhere
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views

Linux Shell Example

This document prompts the user to input a distance between two cities in kilometers, then calculates and displays that distance converted to meters by multiplying the kilometers by 1000, and finally displays the distance in centimeters by multiplying the meters by 100.

Uploaded by

VedasEverywhere
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

echo "distance

read km
m=`expr $km \*
echo "distance
cm=`expr $m \*
echo "distance

between two cities (in km): "


1000`
in meter is :" $m
100`
in centimeter is : $cm"

You might also like