Re: [PATCH 3/3] hush: implement getopt builtin

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

 



On 14:24 Fri 08 Oct     , Sascha Hauer wrote:
> Positional parameters are not nice, so implement a getopt
> function. This has to be done as a builtin because otherwise
> we have no access to the parents argc/argv.
> 
> getopt works as expected, here is a little example:
> 
> while getopt "hs:" OPT
> do
>         if [ $OPT = h ]; then
>                 echo "usage"
>                 exit 1
>         else
>                 echo "scr: opt: $OPT optarg: $OPTARG"
> 	fi
> done
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
how about make it optional?

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux