#!/bin/bash string='four' echo ${#string} # Outputs: 4