Stimulus file to create arbitrary wave shape input?

I’d like to run a simulation with two pulses as input. I’ve managed to use Vsource to create a string of pulses but I don’t see a way to make it stop after two. At least not without ending the simulation at that point. It seems like there should be a way to create a stimulus file that could specify any kind of input wave shape but If that’s possible I don’t know what the syntax would look like and I don’t see anywhere to specify a file as input for Vsource. Anyone know how to do this or where it’s described?

Section 4.1.4 in http://ngspice.sourceforge.net/docs/ngspice-manual.pdf#page=86
Should give you the answer.

I found the solution after I made the post “piece wise linear” transient analysis is what I was looking for.