Re: [PATCH v2] commands: add 'findstr' to search file for string

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

 



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@xxxxxxxxxxxxxx> 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@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