echo "Enter Content" touch contentfile end="end" while true do read content if [ "$content" != "$end" ] then echo $content >> contentfile line=$((line + 1)) else break fi done echo "-----------------------------------------" echo " Content Of File" echo "Name Of File :: contentfile" echo "Number Of Line $line" read data < contentfile while read data do echo "$data" done < contentfile echo "-----------------------------------------"