Hello,
On a Solaris 8 system using a Bourne shell script I need to create and populate a small text file. I know I could do the below but there are too many lines (50-ish) for this to be manageable.
I also thought about doing a HERE type variable using vi but I am not sure how to pass an Escape to vi dynamically. This would be great if I could do this.
Any suggestions?
Thanks,
Michael42
On a Solaris 8 system using a Bourne shell script I need to create and populate a small text file. I know I could do the below but there are too many lines (50-ish) for this to be manageable.
Code:
echo "Line 1" > myfile.txt
echo "Line 2" >> myfile.txt
I also thought about doing a HERE type variable using vi but I am not sure how to pass an Escape to vi dynamically. This would be great if I could do this.
Code:
vi myfile.txt << VI_SESSION
i
Line 1
Line 2
[COLOR=blue]<< Escape and save here??? >>[/color]
VI_SESSION
Any suggestions?
Thanks,
Michael42