[Top][All Lists]

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

Re: Feature Request: scanf-like parsing

From: Chet Ramey
Subject: Re: Feature Request: scanf-like parsing
Date: Fri, 22 Jan 2021 09:12:50 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 1/22/21 12:29 AM, William Park wrote:

But, if data are buried in a mess, then it's very labour-intensive to
dig them out.  It might be useful to have scanf()-like feature, where
stdin or string are read and parsed according to the usual format
string.  I guess, it would actually be sscanf(), since 'read' builtin
reads a line first.  Since you're dealing with strings, only %s, %c, and
%[] are sufficient.

Sounds like a good candidate for a loadable builtin. Anyone want to take
a shot at it?

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

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