Monday 21 November 2011

QuickBits-11: Giving User Input to cmd through file

Lots of user developed commands requires user input for "if you want to continue ... [y/n]" . If you want to automate this

For example: If mycommand requires user input saying 'y' then add 'y' to the arguments.txt file.


cat arguments.txt - | mycommand


Now your mycommand will not ask for user input. It takes it from the file arguments.txt

No comments:

Post a Comment