# Task 7 - An Introduction to Shell Operators

## Task 7 An Introduction to Shell Operators

### If we wanted to run a command in the background, what operator would we want to use?

<details>

<summary>Reveal Flag <span data-gb-custom-inline data-tag="emoji" data-code="1f6a9">🚩</span></summary>

:triangular\_flag\_on\_post:`&`

</details>

### If I wanted to replace the contents of a file named "passwords" with the word "password123", what would my command be?

{% hint style="warning" %}
**HINT**: echo \<content> > \<filename>
{% endhint %}

<details>

<summary>Reveal Flag <span data-gb-custom-inline data-tag="emoji" data-code="1f6a9">🚩</span></summary>

:triangular\_flag\_on\_post:`echo password123 > passwords`

</details>

### Now if I wanted to add "tryhackme" to this file named "passwords" but also keep "passwords123", what would my command be

{% hint style="warning" %}
**HINT**: echo \<content> >> \<filename>
{% endhint %}

<details>

<summary>Reveal Flag <span data-gb-custom-inline data-tag="emoji" data-code="1f6a9">🚩</span></summary>

:triangular\_flag\_on\_post:`echo tryhackme >> passwords`

</details>

### Now use the deployed Linux machine to put these into practice

{% hint style="success" %}
No answer needed
{% endhint %}


---

# 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://thmflags.gitbook.io/thm-walkthroughs/difficulty-info/linux-fundamentals/linux-fundamentals-part-1/task-7-an-introduction-to-shell-operators.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.
