How to print given number in reverse order using shell script?
How to print given number in reverse order using shell script?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
clear
echo "Enter a number: "
read n
echo $n
echo "Reverse Number:"
echo $n | rev
Output:
Enter a number:
12345
Reverse Number:
54321