Skip to main content
HomeShellIntroduction to Bash Scripting

Introduction to Bash Scripting

4.6+
20 reviews
Intermediate

Bash scripting allows you to build analytics pipelines in the cloud and work with data stored across multiple files.

Start Course for Free
4 Hours13 Videos43 Exercises
28,936 LearnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
GroupTraining 2 or more people?Try DataCamp For Business

Loved by learners at thousands of companies


Course Description

Bash is a concise, superfast, and robust scripting language for data and file manipulation. It’s a vital skill for building analytics pipelines in the cloud, favored by Linux users to work with data stored across multiple files. In this course, we’ll guide you through the basics of Bash scripting. We begin with an introduction to Bash script structures, including inputting arguments and outputting results. You’ll then work through data structures, such as variables and arrays, and control statements, including loops and conditionals. You’ll then put what you’ve learned into practice, by creating your own Bash functions and scheduling automated scripts to run like clockwork with cron.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    From Command-Line to Bash Script

    Free

    Save yourself time when performing complex repetitive tasks. You’ll begin this course by refreshing your knowledge of common command-line programs and arguments before quickly moving into the world of Bash scripting. You’ll create simple command-line pipelines and then transform these into Bash scripts. You’ll then boost your skills and learn about standard streams and feeding arguments to your Bash scripts.

    Play Chapter Now
    Introduction and refresher
    50 xp
    Extracting scores with shell
    50 xp
    Searching a book with shell
    50 xp
    Your first Bash script
    50 xp
    A simple Bash script
    100 xp
    Shell pipelines to Bash scripts
    100 xp
    Extract and edit using Bash scripts
    100 xp
    Standard streams & arguments
    50 xp
    Using arguments in Bash scripts
    100 xp
    Using arguments with HR data
    100 xp
  2. 2

    Variables in Bash Scripting

    Master the bread and butter of Bash scripts—variables! In this chapter, you’ll learn how to create basic string and numeric variables, and perform calculations on these variables. You’ll also learn about the magic of a shell-within-a-shell (shell-ception), opening up huge opportunities for advanced scripting.

    Play Chapter Now
  3. 3

    Control Statements in Bash Scripting

    Life isn't always linear and neither should your Bash scripts. In this chapter, you’ll take your Bash scripts to the next level by learning control statements. You’ll learn the differences between FOR, WHILE, IF, and CASE statements and how to use them in your Bash scripts. Armed with these new tools, you’ll be ready to create more advanced Bash scripts with conditional logic.

    Play Chapter Now
  4. 4

    Functions and Automation

    Give your Bash scripts a powerful new addition by building useful functions to process data and variables. In this last chapter, you will learn the structure of functions in Bash, how to use functions to help automate frequent tasks, and program your scripts to run on schedule without needing to even lift a finger.

    Play Chapter Now
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more

Datasets

New HiresSoccer ScoresHire DataModel ResultsRob's FilesModel OutputInherited Folder

Collaborators

Collaborator's avatar
Maggie Matsui
Collaborator's avatar
Lis Sulmont
Alex Scriven HeadshotAlex Scriven

Senior Data Scientist @ Atlassian

Alex is a Senior Data Scientist working for Atlassian in Sydney, Australia and has previous experience in government, agency and startup. He also holds lecturing and research positions at the University of Technology Sydney and the University of New South Wales. He has built and delivered several Masters-level courses in machine learning & deep learning whilst researching on applications of machine learning & data science in industry. From a heavily commercial background, Alex greatly enjoys bridging the gap between cutting-edge technology and business applications.
See More

Don’t just take our word for it

*4.6
from 20 reviews
65%
30%
5%
0%
0%
Sort by
  • Zaahir D.
    3 months

    Loved this, a crucial skill that data scientists need in a professional context, seldom discussed

  • Ben R.
    5 months

    v

  • Daphne B.
    8 months

    I really enjoyed the course and it was a great hands-on course

  • Kasim E.
    9 months

    With real world scenarios and clear explanations I liked it and studied with fun. Thanks

  • Lorenzo I.
    9 months

    Very useful for linux users!

"Loved this, a crucial skill that data scientists need in a professional context, seldom discussed"

Zaahir D.

"v"

Ben R.

"I really enjoyed the course and it was a great hands-on course"

Daphne B.

Join over 14 million learners and start Introduction to Bash Scripting today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.