Introduction
In this challenge, we will create a bash script to compare larger integer values from a n
number of arguments using command line arguments. We will learn how to pass command-line arguments, how to compare integer values in a script, and how to print the largest value among the arguments.
Skills Graph
%%%%{init: {'theme':'neutral'}}%%%%
flowchart RL
shell(("`Shell`")) -.-> shell/ControlFlowGroup(["`Control Flow`"])
linux(("`Linux`")) -.-> linux/BasicSystemCommandsGroup(["`Basic System Commands`"])
linux(("`Linux`")) -.-> linux/InputandOutputRedirectionGroup(["`Input and Output Redirection`"])
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/exit("`Shell Exiting`")
linux/BasicSystemCommandsGroup -.-> linux/echo("`Text Display`")
linux/InputandOutputRedirectionGroup -.-> linux/redirect("`I/O Redirecting`")
linux/BasicSystemCommandsGroup -.-> linux/clear("`Screen Clearing`")
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/str_manipulation("`String Manipulation`")
shell/VariableHandlingGroup -.-> shell/arrays("`Arrays`")
shell/VariableHandlingGroup -.-> shell/param_expansion("`Parameter Expansion`")
shell/ControlFlowGroup -.-> shell/for_loops("`For Loops`")
shell/ControlFlowGroup -.-> shell/cond_expr("`Conditional Expressions`")
shell/ControlFlowGroup -.-> shell/exit_status("`Exit and Return Status`")
shell/AdvancedScriptingConceptsGroup -.-> shell/arith_expansion("`Arithmetic Expansion`")
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-18317{{"`Command-Line Argument Comparison Script`"}}
linux/declare -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
linux/exit -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
linux/echo -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
linux/redirect -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
linux/clear -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/shebang -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/comments -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/quoting -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/variables_decl -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/variables_usage -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/str_manipulation -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/arrays -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/param_expansion -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/for_loops -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/cond_expr -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/exit_status -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/arith_expansion -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/subshells -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
shell/globbing_expansion -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
linux/wildcard -.-> lab-18317{{"`Command-Line Argument Comparison Script`"}}
end