Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

[Bash scripting #1] Parsing options with getopt

Автор: Mindful Technology

Загружено: 2024-03-29

Просмотров: 396

Описание:

0:00 Intro
0:47 An overview of the template script
1:11 The script's version
1:33 The getopt version check
2:16 The script's help message
2:53 The running getopt part
3:34 Re-setting the positional arguments
5:37 The defaults and the config file
7:15 The config file
10:09 The parsing loop
12:31 The advantage of parsing out all of the optional arguments
16:54 The error message in case you forgot to add an option to the parsing loop
18:01 A more detailed look
18:21 The demo script
20:19 The initial arguments
21:08 The value of opts
22:19 What happens when you run getopt
25:06 Options passed to getopt
25:18 The -n option (the name of the script for error messages)
26:08 How to get the name of the script for messages
30:35 The -o and -l options (valid long and short options for the script)
31:49 The three kinds of options
33:45 How to define the three types of options in getopt
36:12 The value of opts and the three kinds of options
36:49 eval and set
38:47 The value of opts and the three kinds of options, continued
39:32 Parsing the three kinds of options in the parsing loop
39:59 Parsing options that take no arguments (flags)
43:44 The error message in case you forgot to add an option to the parsing loop, a demonstration
44:30 Parsing options that take arguments - required and optional
46:28 Options with arguments in the opts string
49:04 Options with arguments in the parsing loop
51:11 A difference in syntax between options that take required vs optional arguments
57:30 The positional arguments after parsing
58:36 A short demonstration of using options parsed with getopt in your script
1:03:48 Conclusion
1:05:20 Outro

search-in-subs on GitHub: https://github.com/linguisticmind/sea...

search-in-subs live coding series:    • [Bash scripting, Live coding] search-in-su...  

The script-template and getopt-demo scripts from this tutorial: https://gist.github.com/linguisticmin...

XDG Base Directory - ArchWiki: https://wiki.archlinux.org/title/XDG_...

[Bash scripting #1] Parsing options with getopt

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

[Bash scripting #2] Single quotes vs double quotes

[Bash scripting #2] Single quotes vs double quotes

getopt vs getopts (Linux Options) #bash #bashscripting #linux #shellscripting

getopt vs getopts (Linux Options) #bash #bashscripting #linux #shellscripting

Taller de Desarrollo 2 - Gestor de Tareas

Taller de Desarrollo 2 - Gestor de Tareas

Creating a Bash script using flags

Creating a Bash script using flags

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Сисадмины больше не нужны? Gemini настраивает Linux сервер и устанавливает cтек N8N. ЭТО ЗАКОННО?

Дополнительный вопрос RHCSA, вопрос 1: Простое написание скриптов для командной оболочки.

Дополнительный вопрос RHCSA, вопрос 1: Простое написание скриптов для командной оболочки.

Bash Scripting on Linux

Bash Scripting on Linux

1,000 Ants vs. Black Widow

1,000 Ants vs. Black Widow

Spring 2021 NIU CSCI 463

Spring 2021 NIU CSCI 463

Typst: Современная замена Word и LaTeX, которую ждали 40 лет

Typst: Современная замена Word и LaTeX, которую ждали 40 лет

Как я металлизировал отверстия в печатных платах

Как я металлизировал отверстия в печатных платах

Physicist Brian Cox explains quantum physics in 22 minutes

Physicist Brian Cox explains quantum physics in 22 minutes

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

Код работает в 100 раз медленнее из-за ложного разделения ресурсов.

OSINT для новичков: найдите всё о юзернейме и фото с Sherlock и Google Dorks!

OSINT для новичков: найдите всё о юзернейме и фото с Sherlock и Google Dorks!

10 Minutes vs. 10 Years of Animation

10 Minutes vs. 10 Years of Animation

Poland - Peru ●World Cup 1982 | Full highlight - 1080p HD | Grzegorz Lato

Poland - Peru ●World Cup 1982 | Full highlight - 1080p HD | Grzegorz Lato

Как устроен эскалатор? [Veritasium]

Как устроен эскалатор? [Veritasium]

Microsoft begs for mercy

Microsoft begs for mercy

I Read Honey's Source Code

I Read Honey's Source Code

Everything You Need To Start Writing Lua

Everything You Need To Start Writing Lua

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: infodtube@gmail.com