Re: [PATCH] commands: add 'findstr' to get string from file

2014-05-22 Thread Christoph Fritz
Hi Sascha On Wed, 2014-05-21 at 15:51 +0200, Sascha Hauer wrote: On Tue, May 20, 2014 at 07:27:55PM +0200, Christoph Fritz wrote: Command 'findstr' can be for example used to find the string MAC=1C:BA:8C:F3:82:BB in file /dev/eeprom0 to set the appropriate variable: $ findstr -o 4 -l

Re: [PATCH] commands: add 'findstr' to get string from file

2014-05-21 Thread Sascha Hauer
Hi Christoph, On Tue, May 20, 2014 at 07:27:55PM +0200, Christoph Fritz wrote: Command 'findstr' can be for example used to find the string MAC=1C:BA:8C:F3:82:BB in file /dev/eeprom0 to set the appropriate variable: $ findstr -o 4 -l 17 -t eth0.ethaddr MAC /dev/eeprom0 Usage: findstr

[PATCH] commands: add 'findstr' to get string from file

2014-05-20 Thread Christoph Fritz
Command 'findstr' can be for example used to find the string MAC=1C:BA:8C:F3:82:BB in file /dev/eeprom0 to set the appropriate variable: $ findstr -o 4 -l 17 -t eth0.ethaddr MAC /dev/eeprom0 Usage: findstr [OPTIONS] STRING FILE Find string in file and print it -o offset set offset of string

Re: [PATCH] commands: add 'findstr' to get string from file

2014-05-20 Thread Alexander Aring
On Tue, May 20, 2014 at 07:27:55PM +0200, Christoph Fritz wrote: Command 'findstr' can be for example used to find the string MAC=1C:BA:8C:F3:82:BB in file /dev/eeprom0 to set the appropriate variable: $ findstr -o 4 -l 17 -t eth0.ethaddr MAC /dev/eeprom0 Usage: findstr [OPTIONS] STRING

Re: [PATCH] commands: add 'findstr' to get string from file

2014-05-20 Thread Christoph Fritz
Hi Alexander On Tue, 2014-05-20 at 20:08 +0200, Alexander Aring wrote: On Tue, May 20, 2014 at 07:27:55PM +0200, Christoph Fritz wrote: +config CMD_FINDSTR + tristate + default n not needed. Ok + while ((opt = getopt(argc, argv, o:l:t:)) 0) { + switch (opt) { +