migrate to git.charlotte.sh

This commit is contained in:
Charlotte Croce 2025-04-19 23:42:08 -04:00
commit fbd588721e
412 changed files with 13750 additions and 0 deletions

View file

@ -0,0 +1,25 @@
---
description: In this lab, we explored basic BASH scripting
---
# Lab09 - BASH Scripting
## Commands to find Information on BASH Environment
* `bash -version | grep version` - BASH version installed
* `which bash` - where the BASH program resides
* `echo $PATH` - [Path Environment Variable](https://en.wikipedia.org/wiki/PATH\_\(variable\))
* `env` - [Environment Variables](https://www.techrepublic.com/article/linux-101-what-are-environment-variables/)
* `history` - shows previous commands executed
## Check if substring is in string
`if [[ $string =~ "substring" ]]; then`
* Ping sweeper script
<figure><img src="../assets/72455756211919931734.png" alt=""><figcaption></figcaption></figure>
* nslookup script
<figure><img src="https://lh7-us.googleusercontent.com/IKQIndPY0hAvn2fDJTtTBRb4CRJ6dzCMFQAZArjp3VfaE00BtvxBj6FZZcvUBCwx-rZw6BkQkIcjoOt8PcNBgQFe_iu1aFde_yg-gxNNxEn3OsSSReVV7Y2ZY1tTr4nhw21-izfg2T10FHsscQeG7A" alt=""><figcaption></figcaption></figure>