This is a general-purpose function to ask Yes/No questions in Bash, either with or without a default answer. It keeps repeating the question until it gets a valid answer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # tunnel browser to another box | |
| # Copyright (c) 2013 Jason W Ryan | |
| # The MIT License (MIT) http://opensource.org/licenses/MIT | |
| user="<your_name>" | |
| exip="XXX.XXX.XXX.XXX" | |
| tunnel_id="$HOME/.local/tmp/tunnel_id" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Structure: | |
| -- src_customers: id, name, address | |
| -- dim_customers: id, name, address | |
| -- Find new records | |
| DROP TABLE IF EXISTS tmp_new; | |
| CREATE TABLE tmp_new AS |