> For the complete documentation index, see [llms.txt](https://til.devjugal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.devjugal.com/linux/bash/length-of-string-in-variable.md).

# Length of String in Variable

We can get the length of string stored in a variable by writing variable name in following syntax -

```bash
${#Variable_Name}
```

### Example

```bash
VAR="String"
echo "Size of variable 'VAR' is = ${#VAR}"
```

***Source:*** [***StackOverFlow***](https://stackoverflow.com/a/17368090)

**Reference(s)**

* [Bash Reference Manual](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameter-Expansion)
