case passthru

David Henderson dhenderson at digital-pipe.com
Thu Feb 18 21:50:25 UTC 2016


On 2/18/16, Mike Frysinger <vapier at gentoo.org> wrote:
> On 18 Feb 2016 11:04, David Henderson wrote:
>> Good morning everyone, I am working with a shell script (#!/bin/sh)
>> that utilizes a case statement to implement updates:
>>
>> case "$(cat /tmp/md5.txt)" in
>>     '123456')
>>         ...implement updates for this particular version...
>>         ;;
>>     '234567')
>>         ...implement updates for this particular version...
>>         ;;
>> esac
>>
>> Using this syntax, I would have to reboot several times in order for
>> all consecutive patches to be implemented.  In bash I can use ;&
>> instead of ;; to allow for continuing from one match to all that
>> follow, but I can't figure it out with the BB shell.  I've tried
>> omitting the ;; characters, but that doesn't work either.  Any info
>> would be appreciated!
>
> as mentioned, this is a seldom used bash extension.  we have added them
> in the past behind config knobs when people felt up to the task.  feel
> free to log a bug at bugs.busybox.net, but most likely it'll need you
> to actually write/submit the patch ;).

Thanks for the info Mike!  I'm not a very good c/c++ coder, so this
would not really work for me.  Currently I'm using the work around
suggested by Bastian, but I do appreciate your assistance.

Dave


More information about the busybox mailing list