Respond to Prompt in Bash Script
I work on a project that requires I frequently build and destroy a virtual machine. I don't enjoy having to do so but virtual machines can be notoriously difficult to prop up, especially when you have a complex app living within it.
Manually typing the same commands over and over can be mind-numbing so I've create a bash script to handle all of the work for me. One hiccup to the process is needing to confirm removal of an existing virtual machine; using a pipe and
echo allows me to answer the prompt:
# ... some directives here
# Remove the machine, confirming "y" when asked by docker-machine
echo 'y' | docker-machine rm default
# ... more directives here
echo I pipe a
y response to
docker-machine's confirmation prompt, thus allowing the script to move forward with other tasks without the need for manual intervention.
I don't, however, know how to handle multiple prompts -- can you tell me and everyone else?
It's no secret that Facebook has become a major traffic driver for all types of websites. Nowadays even large corporations steer consumers toward their Facebook pages instead of the corporate websites directly. And of course there are Facebook "Like" and "Recommend" widgets on every website. One...
My first professional web development was at a small print shop where I sat in a windowless cubical all day. I suffered that boxed in environment for almost five years before I was able to find a remote job where I worked from home. The first...
My new MooTools plugin, ElementFilter, provides a great way for you to allow users to search through the text of any mix of elements. Simply provide a text input box and ElementFilter does the rest of the work.
I've used a list for this example...
Backgrounds have become an integral part of creating a web 2.0-esque website since gradients have become all the rage. If you think gradient backgrounds are too cliche, maybe a fixed position background would work for you? It does provide a neat inherent effect by...