Skip to content

Instantly share code, notes, and snippets.

@niceaji
Created October 26, 2012 00:49
Show Gist options
  • Select an option

  • Save niceaji/3956376 to your computer and use it in GitHub Desktop.

Select an option

Save niceaji/3956376 to your computer and use it in GitHub Desktop.
#!/bin/bash
function wait_for() {
until $1; do
echo $2
sleep $3
done
}
@niceaji
Copy link
Author

niceaji commented Oct 26, 2012

wait_for "ssh $ip echo" "waiting $ip to boot up..." 3
timeout 10 wait_for "ssh $ip echo" "waiting $ip to boot up..." 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment