[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Bash script supporting complex options like GNU find
From: |
Tim Visher |
Subject: |
Re: [Help-bash] Bash script supporting complex options like GNU find |
Date: |
Mon, 12 Feb 2018 08:34:34 -0500 |
On Sat, Feb 10, 2018 at 12:42 PM, Peng Yu <address@hidden> wrote:
> I currently use getopt to support -s --long like options in bash scripts.
>
> https://github.com/karelzak/util-linux/blob/master/misc-
> utils/getopt-parse.bash
>
> But this solution does not support complex expressions made of '-a'
> '-o' '!' '(' and ')' as in defined in GNU find.
>
> Does anybody know a solution that can make a bash script support these
> complex expressions?
>
Using a manual while loop is the most generic and powerful option.
https://mywiki.wooledge.org/BashFAQ/035
--
In Christ,
Timmy V.
https://blog.twonegatives.com
https://five.sentenc.es