Browse Source
For cmdline argument with numeric value, add a new function getargnum It will get proper value with default value as $1, min value as $2, max value as $3, and param name as $4. valid result will be echo to stdout. for nul or value not valid it will just echo the default value. Note: The values should be >=0 [v1->v2]: add arg <minval> [v2->v3]: do not use bash string match =~ Signed-off-by: Dave Young <dyoung@redhat.com>master


1 changed files with 29 additions and 0 deletions
Loading…
Reference in new issue