Bash / Shell Scripting
Variable, quoting, control flow အခြေခံမှ array, grep/sed/awk ဖြင့် text processing, strict mode, trap-based cleanup, argument parsing အထိ သင်ပေးပြီး log file analyzer, backup rotation script, system health-check framework hands-on project များပါဝင်သော Bash / Shell Scripting tutorial ၂၅ ခန်း။
25 သင်ခန်းစာများ · 750 မိနစ် · Learning Platform Editorial Team
လက်ထဲမှာ ဘာရှိရင် ရပြီ
- bash 4+ ပါဝင်သော terminal (bash 5.x အကြံပြု) — Linux, macOS တွင် bash ပါရှိပြီးသား၊ Windows အသုံးပြုသူများ WSL (သို့) Git Bash ကို သုံးနိုင်သည်
- Code editor (VS Code အကြံပြု)
- Advanced chapter သင်ခန်းစာတစ်ခုအတွက် curl နှင့် jq install လုပ်ထားရန် (နှစ်ခုစလုံး အခမဲ့ဖြစ်ပြီး package manager မှတစ်ဆင့် ရရှိနိုင်သည်)
မစခင် ဒီလောက်ပဲ သိထားပါ
- Linux/macOS command line ကို အသုံးပြုနိုင်ရမည် — directory ရွှေ့လျားခြင်း၊ command run ခြင်း၊ output ဖတ်ခြင်း။ ဒီ course က general command-line အခြေခံများကို ပြန်မသင်ဘဲ (ဒါအတွက် ဒီ site ရဲ့ Linux tutorial ကို ကြည့်ပါ) Bash ကို scripting language တစ်ခုအနေနှင့် အထူးသီးသန့် နက်နက်ရှိုင်းရှိုင်း သင်ပေးမည်
- Scripting အတွေ့အကြုံ မလိုအပ်ဘဲ terminal သုံးတတ်ရုံနှင့် စတင်နိုင်သည် — concept တိုင်းကို အခြေခံမှ တဆင့်ချင်း တည်ဆောက်ပေးမည်
- bash install လုပ်ထားသော Linux, macOS, (သို့) WSL environment (ဒီ course တစ်ခုလုံးတွင် bash 5.x ကို သုံးထားသော်လည်း ဥပမာအားလုံးနီးပါးသည် bash 4.x တွင်လည်း အလုပ်လုပ်သည်)
ဒီသင်တန်းပြီးရင် ကိုယ်ဘာလုပ်တတ်မလဲ
- Shebang, quoting, variable-scoping convention မှန်ကန်စွာ သုံး၍ bash script စစ်စစ်များ ရေး/chmod/run နိုင်ခြင်း
- Array, parameter expansion, arithmetic ကို ယုံကြည်စွာ သုံးနိုင်ပြီး [[ ]] က [ ] ထက် ဘယ်အချိန် ပိုကောင်းသလဲ အတိအကျ သိရှိခြင်း
- grep, sed, awk ဖြင့် text ကို process လုပ်ပြီး pipe, redirection, here-document များဖြင့် command များကို ဆက်စပ်ချိတ်ဆက်နိုင်ခြင်း
- strict mode (set -euo pipefail), trap-based cleanup, ဘေးကင်းသော subshell/process-substitution pattern များဖြင့် production-grade script များ ရေးနိုင်ခြင်း
- set -x ဖြင့် script debug လုပ်နိုင်ပြီး ShellCheck ဖြင့် run မခင်ကတည်း bug များ ဖမ်းယူနိုင်ခြင်း
- log file analyzer, backup rotation script, system health-check framework, subcommand ပါသော CLI tool ငယ်လို real automation များ ဆောက်/test နိုင်ခြင်း