We may earn an affiliate commission when you visit our partners.
Course image
Richard Böhm

What is covered?

  • Basics of scripting - no worry you don't know anything about scripting by now

  • Sha-bang explanation - what it is and why the heck it is called sha-bang

  • Decision making

  • Regular expressions

  • Wildcards

  • For & While loops

  • Functions

  • Reading arguments using CASE structure

  • Getopt

  • Getopts

  • ...and many more

And what about AWK? Yes, it is covered here.   And what about SED? Also covered.  

Why I have created this course?

Read more

What is covered?

  • Basics of scripting - no worry you don't know anything about scripting by now

  • Sha-bang explanation - what it is and why the heck it is called sha-bang

  • Decision making

  • Regular expressions

  • Wildcards

  • For & While loops

  • Functions

  • Reading arguments using CASE structure

  • Getopt

  • Getopts

  • ...and many more

And what about AWK? Yes, it is covered here.   And what about SED? Also covered.  

Why I have created this course?

Many years back, when I was starting as UNIX administrator, I had many ideas how to improve specific things using scripts. But, I couldn't find any good resource, which would take me through all needed topic in one place. Somewhere I got great explanation about sha-bang while regular expressions for shell scripting were only mentioned. Somewhere was good explanation about decision making in if statement, but SED and AWK part was missing, and that use of SED and AWK was in my carrer really important. Basically I cannot imagine any single production script, where I wouldn't used SED or AWK, because without them you are not able to create that "magic" in your script. 

Many years later, I am here to share in one place what is really needed in order to create magic script. Not only how to create script, do some decision making in if statements, write functions, use arrays, but mainly how to combine everything including AWK and SED. I was creating this course in a way, which would help me a lot to create great scripts during start of my career. All needed things in one place. 

Please, watch my preview lectures to see what we are going to build in this course.

Enroll now

What's inside

Learning objectives

  • Be able to create pro looking script with parameters
  • Use functions in script
  • Read files line by line using while loop
  • Use math in scripts
  • Be able to decide if value of specific variable is a regular file or a directory
  • Store commands output into an array
  • Be able to do decision making based on match with regular expressions
  • Use sed and awk to take your scripts into next level

Syllabus

Linux commands
Introduction - welcome!
pwd
cd
Read more

Test your knowleadge of what we just learned.

Test what we have just learned

Test what have you just learned

Check what have you just learned

Test what have you just learned.

Interested what [ -f $FILENAME ], [ -d $PATH ] and other filesystem comparisons can do?

for loop theory

From real world: for what purpose we use for loop

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Career center

Learners who complete Linux Bash Shell Scripting: Complete Guide (incl. AWK & SED) will develop knowledge and skills that may be useful to these careers:
System Administrator
A System Administrator is responsible for the upkeep, configuration, and reliable operation of computer systems, especially multi-user computers like servers. This often involves extensive use of the command-line interface and scripting to automate routine tasks, manage configurations, and troubleshoot issues efficiently across numerous machines. This course is an outstanding choice for aspiring and current System Administrators. It provides a comprehensive foundation in Linux Bash Shell scripting, including vital modules like decision making, loops, functions, and advanced argument parsing with Getopt and Getopts. The deep dive into AWK and SED, which are indispensable for processing logs and configuration files, will be particularly impactful for creating robust "production scripts" to streamline administrative workloads and maintain system stability. Mastering these skills is paramount for success in managing complex server environments.
Linux Engineer
A Linux Engineer specializes in designing, implementing, and maintaining robust Linux-based systems. This role demands profound expertise in the operating system's core functionalities, the command line, and automation through scripting to manage servers, deploy applications, and troubleshoot complex issues. For a Linux Engineer, this course is exceptionally well-suited, as it focuses entirely on mastering the Linux Bash Shell. The comprehensive coverage of Linux commands, scripting fundamentals, control flow like IF, FOR, and WHILE loops, and advanced features such as variables, arguments, and filesystem tests provides the essential toolkit. The extensive modules on AWK and SED are particularly invaluable for advanced text processing, log analysis, and data manipulation, enabling the creation of powerful scripts to optimize system performance and automate administrative tasks effectively.
Infrastructure Engineer
An Infrastructure Engineer designs, builds, and maintains the foundational IT systems and services that an organization relies upon, spanning servers, networks, and storage solutions. A deep understanding of operating systems, combined with powerful automation skills, is critical for creating scalable, reliable infrastructure. This course is directly applicable to an Infrastructure Engineer role, providing mastery of Linux Bash Shell scripting, which is essential for managing and automating tasks across diverse infrastructure components. The detailed instruction on Linux commands, variables, control flow, functions, and advanced argument parsing enables the creation of sophisticated scripts for configuration management, system monitoring, and deployment. Furthermore, the expertise gained in AWK and SED is invaluable for parsing logs, processing output, and transforming data to ensure the smooth operation and optimization of complex infrastructure environments.
Automation Engineer
An Automation Engineer focuses on designing and implementing automated solutions to optimize processes, reduce manual effort, and improve efficiency across various domains, from manufacturing to IT operations. Bash scripting is a cornerstone tool for automating system-level tasks, data processing, and workflow orchestration, especially in Linux environments. This course is an excellent resource for an Automation Engineer. It provides practical, hands-on experience in creating scripts with parameters, utilizing functions, and implementing decision-making logic using regular expressions and conditional statements. The in-depth sections on AWK and SED are particularly powerful for developing sophisticated automation scripts that can parse complex text data, transform outputs, and manipulate configuration files, essential for building truly "magic" scripts that streamline operations and enhance system reliability.
DevOps Engineer
A DevOps Engineer bridges the gap between software development and IT operations, focusing on automating and streamlining the software delivery lifecycle. This role heavily relies on scripting for tasks ranging from continuous integration and deployment (CI/CD) to infrastructure management and monitoring. The Linux Bash Shell Scripting course is highly relevant for a DevOps Engineer, offering a deep understanding of shell automation crucial for managing Linux-based environments. Learning to create "PRO looking script with parameters," use functions, and apply regular expressions for robust decision-making directly translates to building efficient automated pipelines. Furthermore, the detailed coverage of AWK and SED provides powerful tools for parsing logs, transforming configuration files, and extracting critical data, essential for maintaining and troubleshooting complex systems and deployments.
Site Reliability Engineer
A Site Reliability Engineer (SRE) combines software engineering principles with operations to build and run large-scale, fault-tolerant systems. A core aspect of the SRE role is to reduce toil through automation, monitor system health, and respond to incidents efficiently, all of which heavily rely on robust scripting skills. The Linux Bash Shell Scripting course is highly beneficial for a Site Reliability Engineer. Mastering the creation of scripts with parameters, utilizing functions, and implementing decision-making based on regular expressions enables the automation of monitoring alerts, diagnostic routines, and incident response runbooks. The extensive coverage of AWK and SED is indispensable for parsing large volumes of log data, extracting crucial metrics, and transforming data for analysis, directly contributing to improving system observability and enabling proactive problem-solving to maintain high reliability.
Cloud Engineer
A Cloud Engineer is responsible for designing, implementing, and managing cloud infrastructure and services on platforms like AWS, Azure, or Google Cloud. While cloud platforms offer specialized tools, a significant portion of cloud operations, especially involving Linux virtual machines, containers, and serverless functions, still benefits immensely from strong Bash scripting skills for automation and orchestration. This course provides a strong foundation for a Cloud Engineer, equipping them with the ability to write scripts for provisioning resources, deploying applications, managing configurations, and performing routine maintenance tasks on Linux-based cloud instances. The focus on robust scripting, including arguments, loops, functions, and powerful text processing with AWK and SED, is crucial for automating operations and efficiently managing infrastructure as code in the cloud environment.
Build and Release Engineer
A Build and Release Engineer focuses on the entire software delivery pipeline, from compiling source code to deploying applications to production environments. This role requires significant expertise in automating build processes, running tests, packaging software, and orchestrating deployments, frequently relying on scripting in a Linux context. This course is highly relevant for a Build and Release Engineer, providing the essential skills to craft robust Bash scripts for continuous integration and continuous delivery (CI/CD). Learning to use command substitution, handle arguments, implement decision-making logic, and create functions directly supports automating complex build steps. The ability to use AWK and SED for parsing build logs, extracting version information, or manipulating deployment manifests is particularly valuable for ensuring smooth, repeatable, and error-free software releases.
Database Administrator
A Database Administrator (DBA) is responsible for the performance, integrity, and security of databases, which frequently reside on Linux servers. This role involves a variety of routine maintenance tasks, monitoring, and troubleshooting that can be greatly enhanced by automation. This course is highly relevant for a Database Administrator. The ability to write powerful Bash scripts enables DBAs to automate tasks such as backups, log rotation, performance monitoring, and executing routine checks efficiently. Learning about command substitution, control flow, functions, and storing command output into arrays provides a robust framework for creating these automation scripts. The detailed sections on AWK and SED are especially valuable for parsing database logs, extracting specific error messages, or formatting query results, helping to streamline database management and ensure operational consistency.
Technical Support Engineer
A Technical Support Engineer provides in-depth assistance to users and resolves complex technical issues, often involving diagnosing problems on servers, applications, and networks. For senior or escalated support roles, the ability to navigate Linux systems, analyze logs, and even write diagnostic scripts is paramount. The Linux Bash Shell Scripting course is highly beneficial for a Technical Support Engineer; it equips them with the fundamental skills for efficient troubleshooting. Learning Linux commands, shell navigation, and how to read files line by line using while loops are crucial for investigating system behavior. The comprehensive coverage of regular expressions, AWK, and SED is particularly powerful for rapidly parsing vast log files, identifying error patterns, and extracting key diagnostic information, enabling faster problem resolution and even proactive issue detection through custom scripts.
Security Engineer
A Security Engineer is tasked with protecting an organization's computer systems and networks from cyber threats. This often involves monitoring systems for suspicious activity, analyzing vast amounts of log data, automating security checks, and scripting defensive measures. The Linux Bash Shell Scripting course is highly relevant for a Security Engineer, as proficiency in shell scripting is a crucial skill for security operations. Learning to use regular expressions for pattern matching, filesystem tests for permission checks, and robust control flow structures directly supports automating security audits and incident response actions. The in-depth coverage of AWK and SED is particularly powerful for parsing security logs, identifying anomalies, extracting critical indicators of compromise, and transforming data for forensic analysis, enabling more efficient and effective threat detection and remediation strategies.
Data Engineer
A Data Engineer designs, builds, and maintains data pipelines, ensuring data is accurately collected, transformed, and made available for analysis. While roles often emphasize programming languages like Python, Bash scripting is a powerful complement for automating data ingestion, orchestrating workflows, and performing initial data manipulation, especially with log files or text-based datasets. An advanced degree is sometimes preferred for this field. This course may be helpful, particularly through its in-depth coverage of AWK and SED, which are exceptionally effective for parsing, filtering, and transforming unstructured data directly. The understanding of Linux commands, redirection, piping, and scripting with variables and control flow helps build a foundation for creating robust and efficient data processing automation within a Linux environment, complementing other data tools.
Bioinformatics Analyst
A Bioinformatics Analyst applies computational tools and techniques to analyze large biological datasets, such as genomic and proteomic information, frequently working within Linux environments and high-performance computing clusters. This role often requires strong scripting skills to automate data processing pipelines and manage scientific workflows. An advanced degree, such as a Master's or PhD, is typically required for this specialized field. This course may be useful for a Bioinformatics Analyst. It provides fundamental skills in Linux Bash Shell scripting, which are essential for managing files, executing programs, and chaining commands for data preprocessing. The detailed modules on AWK and SED are particularly helpful for parsing, filtering, and transforming large text-based biological data files, enabling efficient manipulation of sequence data or experimental results within complex bioinformatics pipelines.
Network Engineer
A Network Engineer designs, implements, and manages an organization's computer networks. While specialized network operating systems are common, many network appliances and monitoring tools run on Linux, making shell scripting a valuable skill for automation, configuration management, and troubleshooting. This course may be useful for a Network Engineer. It provides expertise in Linux Bash Shell scripting, which can be applied to managing Linux-based network infrastructure, automating configuration deployments, collecting network statistics, and performing routine administrative tasks. The comprehensive coverage of Linux commands, redirection, piping, and control flow, combined with the powerful text processing capabilities of AWK and SED, can be helpful for analyzing log files from network devices, parsing command outputs, and automating network diagnostics, enhancing efficiency in network operations.
Quality Assurance Engineer
A Quality Assurance Engineer ensures software products meet quality standards through rigorous testing and validation processes. While often focusing on specialized testing frameworks, the ability to automate test environments, generate test data, and orchestrate complex test scenarios often relies on foundational scripting skills, particularly when interacting with backend systems or deploying applications on Linux. This course may be helpful for a Quality Assurance Engineer. It provides practical knowledge in Linux Bash Shell scripting, including command substitution, control flow with IF, FOR, and WHILE loops, which are crucial for automating repetitive tasks. The coverage of AWK and SED can also be helpful for validating output from applications, parsing log files generated during testing, or preparing specific test data sets, enabling more efficient and reliable testing processes. It helps build a foundation for designing and implementing automated test scripts.

Reading list

We've selected 50 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Linux Bash Shell Scripting: Complete Guide (incl. AWK & SED).
Written by the creators of AWK, this book is the definitive guide to the language. It provides a thorough explanation of AWK's syntax, semantics, and implementation, making it a valuable resource for experienced AWK programmers.
Is widely considered the definitive guide to regular expressions, offering comprehensive and in-depth coverage of the topic. It delves into the intricacies of regex engines and provides extensive examples across various programming languages, making it an invaluable reference for both beginners and experienced users. While not published recently, its foundational knowledge remains highly relevant.
This classic textbook provides a comprehensive overview of speech and language processing, covering topics such as speech recognition, natural language understanding, and computational linguistics.
This comprehensive handbook covers the entire field of robotics and automation, from the basics to the latest developments. It is an essential resource for anyone who wants to learn about this rapidly growing field.
Is widely recommended for beginners to the Linux command line. It provides a comprehensive introduction, starting with the very basics and progressing to shell scripting. It's an excellent resource for gaining a broad understanding and overcoming initial intimidation of the command line. This book is often suggested as a starting point before diving into more complex topics.
Emphasizes writing readable, maintainable, and testable code. Its principles directly apply to structuring control flow for clarity and understandability, reducing complexity and potential errors. It's a widely recommended book for improving code quality.
Comprehensive resource covering a wide array of Linux commands and focusing heavily on shell scripting. It's excellent for those looking to automate tasks and write more complex scripts. It provides in-depth explanations and numerous examples, making it a valuable reference for both intermediate and advanced users.
Comprehensive guide to the Bash shell. It covers all aspects of the Bash shell, from basic commands to advanced scripting techniques.
Provides a comprehensive overview of AWK, with a focus on its design and implementation. It covers topics such as regular expressions, data structures, and performance optimization.
This comprehensive guide covers the fundamentals of natural language processing (NLP) using Python. It provides a solid foundation for understanding and applying NLP techniques to real-world problems.
This cookbook provides a practical approach to learning regular expressions through a collection of over 140 recipes for common tasks. It demonstrates how to apply regex in various programming languages, making it an excellent resource for those who learn by doing. It's particularly useful as a reference tool for solving specific problems.
Comprehensive guide to shell scripting. It covers all aspects of the Bash shell, from basic commands to advanced scripting techniques.
Classic reference on Unix shell programming. It comprehensive guide to the Bash shell, and it covers a wide range of topics, from basic shell commands to advanced scripting techniques.
Authored by the creators of C, this concise book provides a clear and fundamental explanation of C's control flow structures. It is essential for understanding the basic building blocks of control flow in a widely influential language. classic and a valuable reference for C programmers. It's not a beginner's guide but excellent for those with some programming background.
Delves into the underlying concepts of how Linux operates, providing essential context for understanding why commands work the way they do. It's recommended for those who want to move beyond simply memorizing commands and gain a deeper understanding of the system. It covers topics like booting, networking, and the kernel, which are crucial for advanced command-line usage and scripting.
Known as 'The Book' within the Rust community, this official guide provides a thorough introduction to Rust, including its distinct approach to control flow and emphasis on memory safety without a garbage collector. It's crucial for understanding contemporary control flow paradigms in systems programming. It's a comprehensive guide for learning Rust.
Explores various programming paradigms and their underlying computational models. It provides a very broad and deep understanding of different approaches to control flow beyond the typical imperative model, including concepts in declarative and concurrent programming.
Aimed at users who want to advance their shell scripting skills, this book covers more complex topics and techniques for automating system administration tasks. It's suitable for those who have a foundational understanding of the command line and want to write more sophisticated scripts. helps in deepening the understanding of practical scripting for real-world scenarios.
Focusing on best practices for the Java language, this book offers specific guidance on using Java's control flow constructs effectively and avoiding common pitfalls. It's invaluable for Java developers seeking to deepen their understanding of idiomatic control flow in Java. It serves as an excellent reference.
This authoritative book on Go covers the language comprehensively, including its approach to control flow and concurrency, a key contemporary topic. It's valuable for understanding control flow in a modern, concurrent language. It serves as both a tutorial and a reference.
A comprehensive introduction to C++, this book covers control flow in detail within the context of the C++ language. It's suitable for beginners and those transitioning to C++ and provides a solid understanding of C++'s control flow features. It is often used as a textbook.
Focuses on practical advice for software developers, including principles that influence how control flow is managed in real-world projects. While not solely about control flow, it provides crucial context on writing flexible and maintainable code, which directly impacts control flow decisions. It's a highly recommended read for any programmer.
Comprehensive guide to using Sed and Awk in a variety of real-world scenarios. It covers topics such as text processing, data manipulation, and scripting.
Introduces machine learning techniques specifically for text data, covering topics such as text classification, text clustering, and text summarization.
Focuses specifically on mastering regular expressions within the Python programming language. It provides a clear picture of Python's regex interface and the 're' module. While it helps solidify understanding for Python users, additional advanced books might be needed for a deeper theoretical grasp.
Aimed at absolute beginners with basic Python knowledge, this book provides a step-by-step guide to using regular expressions within the Python ecosystem. It includes over 200 examples and exercises, covering both the standard 're' module and the third-party 'regex' module. is particularly useful for those focusing on Python-based applications of regex.
Provides a comprehensive overview of text mining techniques and their applications in various domains, including information retrieval, text classification, and sentiment analysis.
Provides a comprehensive overview of both Sed and Awk, making it suitable for beginners and experienced users alike. It covers the basics of both tools, as well as more advanced topics such as regular expressions and shell scripting.
Provides techniques for improving the internal structure of existing code without changing its external behavior. Many refactoring techniques involve restructuring control flow to improve readability and maintainability. It's a practical guide for working with and improving code containing various control flow structures.
This textbook provides a broad introduction to programming using Python, covering fundamental concepts including control flow statements like conditionals and loops in a beginner-friendly manner. It's suitable for high school and undergraduate students gaining an initial understanding of control flow in Python.
This cookbook provides practical recipes and solutions for common tasks using the Bash shell. It's a great resource for learning by example and quickly finding solutions to specific problems. It's suitable for users who have some familiarity with Bash and want to expand their scripting repertoire.
This seminal book on design patterns provides solutions to common software design problems. Many patterns involve specific ways of structuring control flow to achieve flexibility and maintainability. It's valuable for understanding how control flow is organized in well-designed object-oriented systems.
Provides a broader perspective on system and network administration, with significant coverage of practices and principles applicable to Linux environments. While not solely focused on commands, it offers essential context for why certain commands and scripting are used in a professional setting. It's highly recommended for aspiring and practicing system administrators.
Focuses on using AWK for data analysis. It covers topics such as data cleaning, data manipulation, and statistical analysis.
This pocket guide serves as a concise and handy reference for essential Linux commands. It's not intended for in-depth learning but is highly useful for quickly looking up command syntax and options. It's ideal for users who have some basic understanding and need a portable reference for daily tasks.
Practical guide to shell scripting. It covers a wide range of topics, from basic shell commands to advanced scripting techniques.
Teaches you how to use deep learning to automate tasks in a variety of domains, such as computer vision, natural language processing, and speech recognition.
Provides a comprehensive overview of semantics, which studies the meaning of linguistic expressions, covering topics such as truth conditions, reference, and entailment.
Practical guide to using Sed, with a focus on real-world examples. It covers a wide range of topics, from basic editing tasks to more complex text processing operations.
This introductory textbook provides a concise overview of computational linguistics, covering topics such as natural language processing, machine translation, and computational semantics.
While not solely focused on control flow, this foundational computer science text explores algorithms in depth, which inherently involves various control flow structures for implementation. Understanding the algorithms helps in understanding complex control flow patterns. It standard textbook for computer science students.
Serves as a gentle introduction to regular expressions, ideal for programmers new to the topic. It explains the fundamentals step-by-step with numerous examples, focusing on matching, extracting, and transforming text. It's a valuable resource for gaining foundational knowledge before moving on to more advanced texts.
Practical guide to shell programming. It covers a wide range of topics, from basic shell commands to advanced scripting techniques.
Introduces fundamental algorithms in a very accessible and illustrated manner. Understanding algorithms inherently involves understanding control flow, particularly loops and recursion. It's excellent for visualizing how control flow directs algorithmic execution.
Focuses on the professionalism and ethics of software development. While not a technical deep dive into control flow, it instills practices like testing and writing maintainable code, which indirectly influence how control flow is handled in professional settings. It complements technical knowledge with essential professional skills.
Focuses on contemporary Linux administration topics and tools, including automation, cloud computing, and containers, all of which heavily rely on command-line interaction and scripting. It's suitable for experienced users and professionals looking to update their skills with modern practices.
This recent book explores regular expressions through a series of puzzles, incorporating the use of AI coding assistants. It offers a contemporary perspective on learning and using regex in the age of AI, suitable for those looking for a modern and interactive approach.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Linux Bash Shell Scripting: Complete Guide (incl. AWK & SED).
Using Python to Interact with the Operating System
Most relevant
Linux Bash: Automate, Debug & Process Text
Most relevant
Using Python to Access Web Data
Most relevant
Clinical Natural Language Processing
Most relevant
Learn Bash Shell Scripting for Automation
Most relevant
Complete Web Automation with Excel VBA
Most relevant
Learn Perl 5 By Doing It
Most relevant
Automate the Boring Stuff with Python Programming
Most relevant
Linux Administration Bootcamp: Go from Beginner to...
Most relevant

Udemy Buyer Protection & Guarantee

Verified partner policies & purchase protections

Global Marketplace Leader
Free Trial & Audit

Free Lecture Previews

Free preview video lectures available for all courses; optional 7-day free trial on Personal Plan subscriptions (cancel before trial ends to avoid conversion).

Return & Refund Policy

30-Day Money-Back Guarantee

30-day money-back guarantee on all eligible individual course purchases (provided course content has not been substantially consumed or downloaded). Subscription fees are non-refundable once billed.

Buyer Protections

Verified Academic & Industry Partner

Lifetime access to purchased individual courses and future updates, verifiable certificate of completion, and direct student Q&A forums.

Key Purchase Protections
30-day 100% money-back guarantee on course purchases
Lifetime access on web, mobile, and offline
Certificate of completion included with purchase
Direct instructor Q&A and active student community
OpenCourser Verified Partner Policy details last reviewed: 2026-10-22
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser