My shell script contains a function which is used to print statements to another shell script    function print()    {    echo     insert()          #insert function    for i in $InsertFile1    do    cat $i     done    echo \Exit--------------------------0\    switch($input)    {     case 1 :     ......     ......     default :    }     > Script.sh    }The variable $InsertFile1 = file1.txt and contents of file1.txt is as follows :insert()          #insert functionecho 1 Startecho 2 Stopecho 3 Exitswitch($input)    {     case 1 :     ......     ......     default :    }The expected output should in Script.sh should be the contents of variable $InsertFile1 but my output (i.e. content of Script.sh) is  insert()          #insert function    for i in echo 1    Start    echo 2 Stop    echo 3 Exit    switch($input)        {         case 1 :         ......         ......         default :        }How do I skip the printing of for loop in file Script.sh ?edit : The function print contains several other statements which needs to be included in Script.sh. 
How to use a for loop inside an echo statement which is used to print statements into another script in UNIX
shell script;solaris