Linux

Day 1 (variables, functions, environments) – Linux shell scripting 2024



This day mainly covers ways to bake scripts (basics, like where to put them to be executable), variables, functions, and environment variables. There is a brief extra bit about redirections.

Most material

Redirections:

00:00 § Writing scripts, editors
12:49 Exercise prep (basics, ~/bin and PATH)
14:41 After the exercise
20:35 § Variables
28:46 Exercise 2 (variable)
30:28 After the exercise
30:28 Magic of bash variables
38:11 Exercise 3 (more variables)
40:18 After the exercise
46:58 Wrap-up of variables
47:41 § Functions
1:10:21 Exercise 4 (functions)
1:12:17 After the exercise
1:21:34 § Redirections
1:32:58 Exercise 5 (solution tomorrow)

—–

You might have already used Linux shell commands interactively, but how do you go from interactive terminal use to non-interactive workflow with scripts? This course is oriented on those who want to start using BASH programming fully and use terminal efficiently.

We expect that course participants are familiar with the shell basics (experience with BASH, ZSH, etc). We somewhat touch the Part 1 of the Linux Shell tutorial, and continue to Part 2. Though we expect that participant knows how to create a directory and can edit file from the linux shell command line. We will be scripting a lot, there will be lots of demos and real practicing.

Playlist:

Course webpage:

Aalto Scientific Computing:

[ad_2]

source

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button