From the course: Azure Infrastructure as Code with ARM, Bicep, Terraform, and Pulumi

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Bash vs. PowerShell with Azure CLI

Bash vs. PowerShell with Azure CLI

- [Instructor] Scripting is fundamental to working with infrastructure as code because it enables us to create processes that can be run to ensure that we have consistent results. Many developers are familiar with scripting in one platform or another, but it's likely that you'll encounter both of them and need to know how to work with them. There are other courses that dive deeper into this, but here are some fundamentals and some basic differences between PowerShell and Bash. The first one is that we have comments that are using the hash sign. I like being able to document my code and knowing what's happening. The second is variables. In PowerShell, we use a dollar sign and we can use spaces to go out and set the value. In Bash, there's no dollar sign, it's just the variable name equals whatever it is, and then using it, you can go out and you can refer to it in both cases by using the dollar sign and then the variable name. Looping in PowerShell and Bash is a little bit different…

Contents