parsing_arguments_in_bash_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

parsing_arguments_in_bash_script [06.12.2017 11:14]
Pascal Suter created
parsing_arguments_in_bash_script [20.01.2018 10:19] (current)
Pascal Suter
Line 1: Line 1:
 ====== Parsing arguments in bash script ====== ====== Parsing arguments in bash script ======
 you can access positional arguments through the ''$1'' ''$2'' etc. varaibles and ''$#'' contains the number of positional arguments, but what if you want to parse more advanced, non positional arguments? this simple snippet that i stole from [[http://linuxcommand.org/lc3_wss0120.php|here]] provides an elegant and quick solution:  you can access positional arguments through the ''$1'' ''$2'' etc. varaibles and ''$#'' contains the number of positional arguments, but what if you want to parse more advanced, non positional arguments? this simple snippet that i stole from [[http://linuxcommand.org/lc3_wss0120.php|here]] provides an elegant and quick solution: 
-<code>+<code bash>
 interactive= interactive=
 filename=~/sysinfo_page.html filename=~/sysinfo_page.html
  • parsing_arguments_in_bash_script.txt
  • Last modified: 20.01.2018 10:19
  • by Pascal Suter