Module 1 ยท The terminal, without fear Lesson 3 of 15
Shell scripts that save you time
A shell script is a list of commands in a file, plus enough logic to make it worth saving. Variables, an if and a loop are 90% of every script you will ever write for a job.
Worked example
A ten-line script that prints disk usage, deletes log files older than seven days and writes one line to a summary file replaces fifteen minutes of manual work every Monday.
Your practice task
Write one script that takes a folder name as an argument, counts the files in it and prints a warning if the count is zero.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
A shell script is a list of commands in a file, plus enough logic to make it worth saving. Variables, an if and a loop are 90% of every script you will ever write for a job.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task โ do them and the final project brief writes itself.