List/Grid Tag Archives: scripting
How To reverse the digits of a number using Shell Scripting
In this tutorial, I will share a simple script to reverse a number provided through command line in Unix/Linux Operating System. The script will print the reversed digits of provided number and if no number or more than one numbers are provided, then it will print an error. Algorithm is fairly simple : Let n be the given number. Set rev and rem equals to 0. Find last digit of…