> For the complete documentation index, see [llms.txt](https://hossainemruz.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hossainemruz.gitbook.io/notes/linux/untitled/basics.md).

# Basics

## Array

### Declare an array

We can declare array in bash script using,

```bash
declare -a prefixArray
```

Now, we can put data on array at any index. Array is 0 indexed.

```bash
prefixArray[INDEX]=VALUE
prefixArray[0]="this is first element"
```

After using array clear the memory using `unset`,

```bash
unset prefixArray
```
