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 »

Still not found what you are looking for? Try again here.