I don't want to write the file manually, so I made a shell-script.
Is there a way to write & save the file automatically without getting the user to press keys?
sudo nano blah
#write stuff to file
#save file
#continue
^ This will be inside a *.sh file
Or is there another way to create a simple text file in a script?