How do arguments work in Bash scripting? How can my bash script accept input? Here's a quick video covering the basics of arguments in Bash scripting. Arguments are the data that you pass in when you call a script, like "scriptname argument1 argument 2".
In real life, this is something like 'tar zcf filename.tar.gz directory' ('zcf', 'filename.tar.gz', and 'directory' are the arguments in this example).
$# -- number of args that our script was run with
$0 -- the filename of our script
$1..$n -- script arguments
Full Bash Scripting Basics Playlist: [ Ссылка ]
The only non-video Bash scripting resource you need: [ Ссылка ]
Step-by-step project-based Linux course for beginners: [ Ссылка ]
Free Linux Sysadmin Course Playlist: [ Ссылка ]
DigitalOcean referral link: [ Ссылка ]
Patreon: [ Ссылка ]
Official Site & e-mail list: [ Ссылка ]
Twitter: [ Ссылка ]
Facebook: [ Ссылка ]
Podcast: [ Ссылка ]
Ещё видео!