Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 1.79 KB

File metadata and controls

68 lines (48 loc) · 1.79 KB

MyShellScriptBasics

A structured learning repository focused on KornShell (.ksh) scripting, emphasizing script creation, design patterns, and clean shell programming practices.

This repository intentionally avoids system administration tasks (e.g., permissions, users, services) and focuses purely on logic, structure, and maintainability.


📌 Goals

  • Learn KornShell as a programming language
  • Write readable, modular, and reusable scripts
  • Apply shell-specific design patterns
  • Build production-style scripts using POSIX tools
  • Handle structured data formats like XML, SGML, and DTD using shell pipelines and tools
  • Gain experience in processing both unstructured and structured data

📂 Repository Structure

Directory Description
basic_commands/ Basic Shell Commands Cheat Sheet
fundamentals/ Variables, input/output, arithmetic, quoting
control_flow/ if/else, case, loops
functions/ Function design and modular scripting
patterns/ Common shell design patterns
text_processing/ grep, awk, sed, pipelines
markup_processing/ XML, SGML, DTD
projects/ End-to-end scripts applying multiple concepts
snippets/ Reusable shell code snippets
notes/ Lessons learned and best practices

🧩 Shell Design Patterns Covered

  • Main Pattern
  • Guard / Fail-Fast Pattern
  • Command Dispatcher Pattern
  • Logging Pattern
  • Configuration-as-Data Pattern
  • Pipeline Pattern

▶️ Running Scripts

Most scripts can be run using:

ksh script_name.ksh 

🤝 Contributing

This repository is mainly for personal learning, but feedback, insights, and pull requests are always welcome!

Feel free to fork, explore, or suggest new exercises and challenges.