> For the complete documentation index, see [llms.txt](https://security.musana.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://security.musana.net/bash-scripting/samples.md).

# Samples

```
#!/bin/bash
for url in $(cat cisco.txt);do
host $url |grep "has address" | cut -d" " -f4
done
```

```
#!/bin/bash

for ip in $(seq 200 210); do    # seq gets 200 201 202...
ping -c 1 192.168.31.$ip | grep "bytes from" | cut -d " " -f4| cut -d ":" -f1 &        # ping all ips with in the range of 200 - 210 with 1(c) packet     
done

```
