help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: function with description


From: Lawrence Velázquez
Subject: Re: function with description
Date: Mon, 28 Jun 2021 20:30:40 -0400
User-agent: Cyrus-JMAP/3.5.0-alpha0-530-gd0c265785f-fm-20210616.002-gd0c26578

On Mon, Jun 28, 2021, at 7:40 PM, lisa-asket@perso.be wrote:
> >You can add argument (option) processing and have the function print a
> >usage message to stderr (or stdout) when invoked incorrectly. One of my
> >earlier examples did precisely that.
> 
> Is that when you used
> 
> if (($# != 3)); then
> echo 'usage: print-lines startnum endnum startdir' >&2
> return 1
> fi
> 
> Need  something more elaborate than that.  Something that matches
> 
> "help", "-h", "-?" and "--help".

https://mywiki.wooledge.org/BashFAQ/035

-- 
vq



reply via email to

[Prev in Thread] Current Thread [Next in Thread]