# 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

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://security.musana.net/bash-scripting/samples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
