[sr-dev] [kamailio/kamailio] kamctl - shell interpreter selection (#2019)

sergey-safarov notifications at github.com
Wed Jul 31 03:13:40 CEST 2019


May be this
```sh
#!/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?"
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2019#issuecomment-516653478
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190730/83459044/attachment.html>


More information about the sr-dev mailing list