Check out example codes for "bash endless loop". It will help you in understanding the concepts better.

Code Example 1

#!/bin/bash
while true
do
	echo "Press [CTRL+C] to stop.."
	sleep 1
done

Learn ReactJs, React Native from akashmittal.com