-1

I have a scenario where a shell script runs another shell script. The second shell script prompts user to type review comments and close the file.

In my case, I do not want to type anything but only save and quit (equivalent vim command :wq) the file. I want to automate this through a shell script where I don't want manual intervention to save and quit the file. How can i achieve this?

John Kugelman
  • 349,597
  • 67
  • 533
  • 578
Pramod
  • 1
  • 2

1 Answers1

-1

I'm not sure i get the context but if you simply (echo "input of your choice" >> file.txt ) it will do the job and will not have to quit and save anything if th einput is already in a file you can (cat inputfile.txt >> file.txt ) this command can be place inside of your first script

odran
  • 11
  • 3