Programming and Application Security
Scripting
Bash and PowerShell scripts for everyday admin work.
- 8 notes
- 66 minutes of reading
- Bash scripting basics: variables, conditions, loops and exit codesThe building blocks of Bash scripts for engineers: the shebang, variables and quoting, if and case, loops, functions, exit codes and the safety options that stop scripts failing silently. 8 min · Beginner
- Useful Bash scripts for network checksPractical Bash scripts for everyday network checks: reachability sweeps from a host list, TCP port tests, DNS lookups and HTTP health checks, with results written to a CSV file. 8 min · Beginner
- PowerShell basics: cmdlets, objects and the pipelineAn introduction to PowerShell 7 and Windows PowerShell for engineers: verb-noun cmdlets, finding help, the object pipeline, variables, loops and running your first script safely. 8 min · Beginner
- PowerShell for Windows and network administrationUsing PowerShell for real admin work: network diagnostics, IP configuration, event logs, services, remoting with Invoke-Command, Active Directory and Microsoft Graph, with safe habits such as -WhatIf. 9 min · Intermediate
- Scheduling scripts: cron, systemd timers and Windows Task SchedulerHow to run scripts automatically on a schedule using cron and systemd timers on Linux and Task Scheduler on Windows, including cron syntax, service accounts, logging and common pitfalls. 7 min · Beginner
- Text processing on the command line: grep, awk, sed, cut and sortHow to slice logs and device output with grep, cut, awk, sed, sort and uniq, with worked examples for syslog, firewall logs and show command output. 8 min · Beginner
- Git basics for engineers: commits, branches and remotesThe Git commands and ideas an infrastructure engineer needs: repositories, staging, commits, branches, merging, remotes, pull requests and .gitignore, applied to scripts and device configs. 9 min · Beginner
- Writing safe scripts: testing, dry runs, logging and secretsHabits that stop automation causing outages or leaks: defensive coding, linting, lab testing, dry-run modes, confirmation prompts, logging and keeping credentials out of scripts. 9 min · Intermediate