RE: How to print given number in reverse order using shell script?

    How to print given number in reverse order using shell script?

    chayan Senior Developer Asked on December 7, 2017 in LINUX.
    Add Comment
    1 Answers
      
      clear
      
      echo "Enter a number: "
      
      read n
      
      echo $n
      
      echo "Reverse Number:"
      
      echo $n | rev
      
      

       

      Output:

      
      Enter a number:
      
      12345
      
      Reverse Number:
      
      54321
      
      
      Team Leader Answered on December 27, 2017.
      Add Comment

      Your Answer

      By posting your answer, you agree to the privacy policy and terms of service.