[ Date Index ]
[ Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
Re: [LUG] standard error handling
- To: list@xxxxxxxxxxxxx
- Subject: Re: [LUG] standard error handling
- From: Paul Sutton <zleap@xxxxxxxxxxx>
- Date: Sun, 1 Sep 2019 17:00:18 +0100
- Autocrypt: addr=zleap@xxxxxxxxxxx; keydata= mQINBFhySwUBEACwN0bpRaDa+/+K3cmt7uXqhM6iDrazubnTZG3lmsee/oEot1QtQ0ue22T3 eiE+77qjlH8h6THDdgQWa2gmAGRGoc1cdmdc+H0ycseEeUP3/tcGQj1kXeElclMQX3w/v4aM mPlAFo7vMhizxliR5uTfJjiZcmqgWEiNBE+vUpp+vlvMVbQHLTh9+1uil0W9gStcLP2N/gSC AxsvJu/X50F9nWlMYNmvJamJQ7OOqhy8nhkCzPM9r5ORkVETPfaqLFk675aklGaIzm38HMs/ gESbs4+96NJWTmM0UaW2Qal4FsVlbAKivzlNpZmGozvtb8xHBbskk29AcDUCo2vdYDKVddUc 2EZ8wQ88hNzj+0vNQlJc5adlNusGNqNOHF536w+Zj6dx1Xa5X+6gW56Eds3NXhJVBlxhvdXu U0/q21/FnrekvnfzUdXW4gCiAA3DRAammboC9hffa4KvXa78hIY4mZDEF/lxIK0QUtevESUx HYtD+0iHeYRfc/ReA0FIUXbalAK9tEW8kD+vGaeSrsJy7zOaiN8bGwcHGUFGAZgqrZlgWUIu G3gecPUVDRRcNroaew4lAxxkNqfvhFBAM+RnveMvE7GbSrtiQzAm46yZBJptaLO63lhtxSkE TPlN/SU8pMpWAdUmVQH35tX0w7jAfi4O5C/ECR4fWYmlB5XwtwARAQABtB9QYXVsIFN1dHRv biA8emxlYXBAZGlzcm9vdC5vcmc+iQJUBBMBCAA+FiEEfW22gvNRjQgYkx4W8IZVN9BmMC0F Alw4lLoCGyMFCQlmAYAFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQ8IZVN9BmMC1dAQ/8 DVPQ/BAINYg55yDk//aalNlbgM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x
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dclug.org.uk; s=1554804362; h=Sender:Reply-To:List-Subscribe:List-Help: List-Post:List-Unsubscribe:List-Id:Subject:Content-Type:In-Reply-To: Mime-Version:Date:Message-ID:From:References:To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Owner:List-Archive; bh=1CJnGykXIWnVIDNReONJT9AmQ7yDUoyi91QX6t5ki0Q=; b=jXrQn03qzNdVPhbs8bE6KK53PA UbTRCYgMgVPTbP1ODTZjTYD8/kqDezr1aXr6OZtjLaM/4iH9u2Sd4wjLNM4tuSiDl++mS10FNE+Yr btCanJIZe1iyksP8GfGLb2G8axNoFCEr/MwcjC8d/i9JYl7z2hI/wpzc4sc9Ybhwxxg4=;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1567353619; bh=MROOV7wrYGRdb0aNkNydXrYoH4GLeGW2mrBGhpgWI6I=; h=Subject:To:References:From:Date:In-Reply-To; b=NzGm2a/ACbMoTjLAKbafjsRrrFJoUie/h6Ry+SCOO0CIDiDO3hlEHuCTh45WJKQsn n1c4gycdMUHIDY+TefzHpOfDQs6alyD0K2+aI7hWk2Bf9QaqWwt6wMHBo9HZtDbJOy +oiOxXXs9yZXyz5SrZItjG8jmozb8DYa3vzpIgbfd0j8NRxLfsTszE2g5A9RPJk3Io 3z3p4kiBIrOB3j1SnVE/a/AbdMy+JuFJBumoBHZJEAKS/G9w/Edg5jq4eeTx9QHcB+ C1NUqUGiJN7A2vGARQXY7vCM3bsvSF1nQW5NggHuKWN55wi68L2bj2QLWOPdQ/u4+b dyXr//NeBRM/w==
- Openpgp: preference=signencrypt
No problem
I have attached as checkbox.sh.txt am not sure if some systems like
shell scripts being attached.
Paul
On 01/09/2019 16:54, Dom Rodriguez wrote:
> Just for the purposes of readability, can you attach the script as a separate
> attachment rather than in the email? Would be easier to read, that's all.
>
> Thanks :)
> On this date - Sun, Sep 01, 2019 at 04:44:51PM +0100, Paul Sutton wrote:
>> Hi
>>
>>
>> I am trying to write a shell script in whiptail ( this is a graphical
>> toolkit for bash)
>>
>> whiptail --title "Check list example" --checklist \
>> "Choose user's permissions" 20 40 4 \
>> "Hello" "Print Hello" OFF \
>> "Goodbye" "Print Goodbye" OFF \
>> "CYA" "Print cya" OFF \
>>
>> CHOICEs=$?
>>
>> echo $CHOICEs
>>
>> if $CHOICEs = "Hello" ; then
>> echo "you selected hello"
>> elif $CHOICEs = "Goodbye" ; then
>> echo "You Said Good bye"
>> elif i$CHOICES = "CYA" ; then
>> echo "You said cya"
>> fi
>>
>> This produces a small menu with check boxes (so the first part works),
>> I can select what I want and press Ok.
>>
>> I am not really sure how do handle the output and the 2nd part of this
>> script doesn't work as expected. But I don't fully understand stderr
>> which is the how whiptail outputs to the console / terminal.
>>
>> Using the information at (
>> https://en.wikibooks.org/wiki/Bash_Shell_Scripting/Whiptail#Check_list i
>>
>> This just tells me how to handle the graphical part of this. Not how
>> to handle what is produced.
>>
>> Clearly the example above is meant to echo to the screen something
>> relating to the options selected, however as echo can be replaced with
>> other commands I am just keen to get this working on a very basic level
>> before I try and do something a little more complex.
>>
>> Can anyone help please.
>>
>> thanks
>>
>> Paul
>>
>> --
>> Paul Sutton
>> http://www.zleap.net
>> gnupg : 7D6D B682 F351 8D08 1893 1E16 F086 5537 D066 302D
>>
>> https://fediverse.party/ - zleap@xxxxxxxxxxxxxxx
>>
>>
>> --
>> The Mailing List for the Devon & Cornwall LUG
>> https://mailman.dclug.org.uk/listinfo/list
>> FAQ: http://www.dcglug.org.uk/listfaq
--
Paul Sutton
http://www.zleap.net
gnupg : 7D6D B682 F351 8D08 1893 1E16 F086 5537 D066 302D
https://fediverse.party/ - zleap@xxxxxxxxxxxxxxx
Attachment:
checkbox.sh.txt
Description: Text document
--
The Mailing List for the Devon & Cornwall LUG
https://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq