New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kamctl - shell interpreter selection #2019
Labels
Comments
May be this #!/bin/sh
get_answer ()
{
value=$1
question=$2
if [ "${value}" = "ask" ]; then
echo -n "$question"
read value
fi
ANSWER=$(echo ${value} | grep -o -e '[YyNn]' | sed -e 's/Y/y/' -e 's/N/n/')
}
get_answer ask "My question?" |
miconda
added a commit
that referenced
this issue
Sep 16, 2019
- contributed by Sergey Safarov, GH #2019
Thanks @sergey-safarov, I replaced the existing function with the one you proposed until getting to a decision on kamcli vs kamctl+bash/shell. |
This issue is stale because it has been open 6 weeks with no activity. Remove stale label or comment or this will be closed in 2 weeks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The
kamctl
tool seems to requirebash
, while trying to use/bin/sh
, which can point todash
or other shell interpreters.For example, the output of
kamdbctl create
:It seems that the issue is expanding the variable when getting the answer for y/n question:
Such expression seems to be specific for bash:
Troubleshooting
Reproduction
Run
kamctl
with/bin/sh
pointing tobash
.Possible Solutions
Decide what to do to have an acceptable solution: enforce
bash
, remove bashisms`...Or maybe focus to make
kamcli
a (full) replacement forkamctl/kamdbctl
and get rid of those old-style shell/bash scripts:The text was updated successfully, but these errors were encountered: