Is it possible to create a here document by running a script interactively?

hi,

i have script which installs around 20 packages. during installation of each package script will be prompted for user input.

i need to run the script in non-interactive by using here document. is it possible to generate here document by running the script in interactive mode on Solaris? :confused:

Thanks,
Satya

You can use the script command - it will create a file of all of the commands you entered.