There's a really cool command called 'yes' that was made just for this purpose (automating repetitive prompts). It repeatedly outputs the string you give it, so you can pipe it into the command that's prompting you like so:
Code:
yes n | cp -i -r /foo
And every time cp pauses with a prompt it will be fed an 'n' + newline from yes
No comments:
Post a Comment