# Bash

{% code lineNumbers="true" %}

```bash
# for loop
root@box ~ $ for num in {1..4}; do echo "The number is: $num"; done
The number is: 1
The number is: 2
The number is: 3
The number is: 4
```

{% endcode %}

```bash
# for loop combining awk
root@box ~ $ for subd in $(awk '{print $1 ""}' subdomains.txt); do echo $subd; done
blog.techwithtyler.dev
braindump.techwithtyler.dev
techwithtyler.dev
www.techwithtyler.dev

# original file
root@box ~ $ cat subdomains.txt
blog.techwithtyler.dev 234234234
braindump.techwithtyler.dev 25346536
techwithtyler.dev 43564356743
www.techwithtyler.dev 45776568
```


---

# 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://www.techwithtyler.dev/coding-and-cli-tooling/coding-and-scripting/bash.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.
