From: Christoph Fritz <chf.fritz@googlemail.com>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] commands: add 'findstr' to search file for string
Date: Wed, 21 May 2014 11:49:43 +0200 [thread overview]
Message-ID: <1400665783.4772.37.camel@mars> (raw)
In-Reply-To: <20140521132228.aeeab4590eb6731f0654c785@gmail.com>
Hi Antony
On Wed, 2014-05-21 at 13:22 +0400, Antony Pavlov wrote:
> On Wed, 21 May 2014 10:02:42 +0200
> Christoph Fritz <chf.fritz@googlemail.com> wrote:
>
> > Command 'findstr' can be for example used to find string
>
> We already have some commands with string.h style names:
> memcmp, memcpy, memset
>
> Can we use 'strstr' name for your new command?
Sure, anyone with any objections?
> Another proposition:
> can we add <offset from file start> and <no more N characters to
> search> parameters?
>
> Using these parameters you can speed up your search and use your
> command with /dev/mem.
Ok, I can add this to a [PATCH v3], anyone with any objections?
> > "MAC=1C:BA:8C:F3:82:BB" in file /dev/eeprom0 to set an
> > appropriate environment variable:
> >
> > $ findstr -o 16 -l 17 -t eth0.ethaddr pcm051_eth0_MAC= /dev/eeprom0
> >
> > Usage: findstr [OPTIONS] <STRING> <FILE>
> > Find ASCII string in file and print it
> > -o <offset> set offset of string which gets printed
> > -l <length> set length of string which gets printed
> > -t <var> print into variable instead of stdio
Thanks
-- Christoph
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-05-21 9:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 17:27 [PATCH] commands: add 'findstr' to get string from file Christoph Fritz
2014-05-20 18:08 ` Alexander Aring
2014-05-20 20:29 ` Christoph Fritz
2014-05-21 3:44 ` Alexander Aring
2014-05-21 8:02 ` [PATCH v2] commands: add 'findstr' to search file for string Christoph Fritz
2014-05-21 9:22 ` Antony Pavlov
2014-05-21 9:49 ` Christoph Fritz [this message]
2014-05-21 13:51 ` [PATCH] commands: add 'findstr' to get string from file Sascha Hauer
2014-05-22 9:20 ` Christoph Fritz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400665783.4772.37.camel@mars \
--to=chf.fritz@googlemail.com \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.