Introduction
In this challenge, you will learn how to use command-line arguments, arithmetic operations, and loops in shell script to reverse a given number. You will extract each digit of the number and convert it to reverse. This challenge will help you to understand the working of command-line arguments and arithmetic operations in shell script.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
shell(("`Shell`")) -.-> shell/ControlFlowGroup(["`Control Flow`"])
linux(("`Linux`")) -.-> linux/BasicSystemCommandsGroup(["`Basic System Commands`"])
shell(("`Shell`")) -.-> shell/BasicSyntaxandStructureGroup(["`Basic Syntax and Structure`"])
shell(("`Shell`")) -.-> shell/VariableHandlingGroup(["`Variable Handling`"])
shell(("`Shell`")) -.-> shell/AdvancedScriptingConceptsGroup(["`Advanced Scripting Concepts`"])
shell(("`Shell`")) -.-> shell/SystemInteractionandConfigurationGroup(["`System Interaction and Configuration`"])
linux(("`Linux`")) -.-> linux/FileandDirectoryManagementGroup(["`File and Directory Management`"])
shell/ControlFlowGroup -.-> shell/if_else("`If-Else Statements`")
linux/BasicSystemCommandsGroup -.-> linux/declare("`Variable Declaring`")
linux/BasicSystemCommandsGroup -.-> linux/echo("`Text Display`")
linux/BasicSystemCommandsGroup -.-> linux/read("`Input Reading`")
shell/BasicSyntaxandStructureGroup -.-> shell/shebang("`Shebang`")
shell/BasicSyntaxandStructureGroup -.-> shell/comments("`Comments`")
shell/BasicSyntaxandStructureGroup -.-> shell/quoting("`Quoting Mechanisms`")
shell/VariableHandlingGroup -.-> shell/variables_decl("`Variable Declaration`")
shell/VariableHandlingGroup -.-> shell/variables_usage("`Variable Usage`")
shell/VariableHandlingGroup -.-> shell/arrays("`Arrays`")
shell/ControlFlowGroup -.-> shell/for_loops("`For Loops`")
shell/ControlFlowGroup -.-> shell/while_loops("`While Loops`")
shell/ControlFlowGroup -.-> shell/cond_expr("`Conditional Expressions`")
shell/AdvancedScriptingConceptsGroup -.-> shell/arith_expansion("`Arithmetic Expansion`")
shell/AdvancedScriptingConceptsGroup -.-> shell/read_input("`Reading Input`")
shell/AdvancedScriptingConceptsGroup -.-> shell/cmd_substitution("`Command Substitution`")
shell/AdvancedScriptingConceptsGroup -.-> shell/subshells("`Subshells and Command Groups`")
shell/SystemInteractionandConfigurationGroup -.-> shell/globbing_expansion("`Globbing and Pathname Expansion`")
linux/FileandDirectoryManagementGroup -.-> linux/wildcard("`Wildcard Character`")
subgraph Lab Skills
shell/if_else -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
linux/declare -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
linux/echo -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
linux/read -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/shebang -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/comments -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/quoting -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/variables_decl -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/variables_usage -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/arrays -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/for_loops -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/while_loops -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/cond_expr -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/arith_expansion -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/read_input -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/cmd_substitution -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/subshells -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
shell/globbing_expansion -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
linux/wildcard -.-> lab-18291{{"`Reverse Number Using Shell Script`"}}
end