[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] Build-in 'read' command & optional switches ?
From:       mjn3 () codepoet ! org (Manuel Novoa III)
Date:       2004-04-26 17:00:59
Message-ID: 20040426170059.GA13473 () codepoet ! org
[Download RAW message or body]

On Mon, Apr 26, 2004 at 12:57:54AM -0700, sander dijkstra wrote:
> 
> Does the build-in read command of busybox's ash accept any optional switches ??
> 
> I have a few bash scripts which I want to run in busybox, but the 'read' command \
> ain't accepting the -n1 switch. In Bash scripting the -n switch allows one to read \
> N characters instead of a single line. This way userinput doesn't need to wait for \
> the [enter] key. I couldn't find any info on optional switches for the read command \
> ? are there any at all ? 

The ash builtin read accepts -r and -p.  SUSv3 requires only -r be supported.

> If not, is there another way I could ask the user to input a single key without \
> enter ?

You could always patch ash.c's readcmd function.  Adding support for -n
would be almost trivial.

Manuel



_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic