SWAPPING

SOURCE CODE:
echo “ First value ”
read a
echo “ Second value ”
read b
temp=$a
a=$b
b=$temp
echo “ The swapped value:  ”
echo “ First value = $a ”
echo “ Second value = $b ”


OUTPUT:
[examuser35@localhost Jebastin]$ sh swapping.sh
First value
23
Second value
10
The swapped value is:
First value = 10
Second value = 23
Previous
Next Post »

If you still didn't find what you're looking for, you can search this website below: