#!/bin/bash StringVal="Welcome to linux" for val in $StringVal; do echo $val done # Output: # Welcome # to # linux