Function'lar, Argümanlar ve Option Parse Etmek: $@, shift, getopts ve İyi Bir --help
Bash'te function veriyi stdout'tan, başarıyı exit code'dan döner; içindeki variable'lar local yazılmazsa global olur ve scope dinamiktir. Ortak function'ları source edilen bir kütüphanede toplayıp positional parametreler, shift, getopts ve uzun option'lar için while/case kalıbıyla Bookstore'un bookstore-deploy.sh -e staging -v 1.4.2 --dry-run arayüzünü, iyi bir --help metnini ve printf %q ile çalışan bir dry run'ı kuruyoruz.
15 Kas 2026
·
14 dk
·
19