I am interested in creating a new file from a KSH script where the first line is printed. I know how to create the file, but creating with a pre-defined first line is what I need help with.
My code below creates the file, but how do I accomplish that and do it so that when I open that txt file it has a number 1 or statement in the first line?
filebegin="FILE_"
filedate=`date +%m-%d-%Y`
fileend=".txt"
createfile=$filebegin$filedate$fileend
echo $createfile
touch $createfile