Passing arguments to a program is one of the common operations across any language you use. In this article, we are going to see how to parse arguments in bash scripts using bash builtin getopts function.
Shell
-
- Bash scriptingBASHBash TipsFAQLinuxLinux AdministrationLinux BasicsLinux CommandsLinux Tips & TricksScriptingShell ScriptsTips and TricksUnix/Linux Beginners
Bash Heredoc Tutorial For Beginners
By KarthickBy Karthick 2,730 viewsHereDoc, acronym for Here Document, is an input Redirection method to pass multiple inputs to a program or command in Bash.
- Fish shellLinuxLinux BasicsLinux CommandsLinux Tips & TricksUnix/Linux Beginners
Quickly Navigate Through Directory History In Fish Shell
By skBy sk 1,390 viewsDo you often work with large number of directories? I have a small tip…
- Fish shellLinuxLinux BasicsLinux CommandsLinux Tips & TricksUnix/Linux Beginners
How To Launch Fish Shell In Private Mode In Linux
By skBy sk 958 viewsFish shell ships with many cool features by default. One such feature is Private…
- Fish shellLinuxLinux BasicsLinux CommandsLinux Tips & TricksUnix/Linux Beginners
Enable Timestamp For History Command In Fish Shell
By skBy sk 2,137 viewsWhenever a command is entered in the terminal, it will be saved at the…
- ZshLinuxLinux BasicsLinux CommandsLinux Tips & TricksUnix/Linux Beginners
Enable Timestamp For History Command In Zsh In Linux
By skBy sk 9,593 viewsEnabling timestamp in history command output helps us to find when a certain command…
- UbuntuCommand line utilitiesFAQLinuxLinux AdministrationLinux DistributionsOpensourceScriptingShell Scripts
Convert Ubuntu Into Rolling Release Using Rolling Rhino
By skBy sk 1,361 viewsArch Linux follows the rolling-release model to provide the latest and up-to-date stable versions…
- Bash TipsBASHFAQLinuxLinux BasicsLinux CommandsLinux Tips & TricksTips and Tricks
Difference Between Defining Bash Variables With And Without export
By skBy sk 1,414 viewsI’ve added this “export HISTCONTROL=ignoredups” line in ~/.bashrc file to avoid duplicate entries in…
- BASHBash TipsFAQLinuxLinux BasicsLinux CommandsLinux Tips & TricksTips and TricksUnix/Linux Beginners
How To Avoid Duplicate Entries In Bash History In Linux
By skBy sk 6,713 viewsIn this brief guide, we will learn how to avoid duplicate entries in Bash…
- Bash TipsBASHCommand line utilitiesFAQLinuxLinux BasicsLinux CommandsLinux Tips & TricksTips and TricksUnix/Linux Beginners
[Bash Tips] Rename Files Without Typing Full Name Twice In Linux
By skBy sk 2,160 viewsThis brief guide explains how to rename files without typing full name twice in…