The Following User Says Thank You to Serafin For This Useful Post: | ||
|
2011-09-18
, 01:30
|
Posts: 13 |
Thanked: 6 times |
Joined on May 2008
@ RVA
|
#23
|
Just copy and paste if you can.
rootsh grep -A 13 lock_code /dev/mtd1 | tail -1
|
2011-09-18
, 01:50
|
|
Posts: 4,672 |
Thanked: 5,455 times |
Joined on Jul 2008
@ Springfield, MA, USA
|
#24
|
The Following User Says Thank You to danramos For This Useful Post: | ||
|
2011-09-18
, 01:58
|
|
Posts: 4,672 |
Thanked: 5,455 times |
Joined on Jul 2008
@ Springfield, MA, USA
|
#26
|
|
2011-09-18
, 01:59
|
|
Posts: 4,672 |
Thanked: 5,455 times |
Joined on Jul 2008
@ Springfield, MA, USA
|
#27
|
|
2011-09-18
, 02:02
|
Posts: 13 |
Thanked: 6 times |
Joined on May 2008
@ RVA
|
#28
|
Just do you understand each part...
rootsh is telling the system to run the following as the root user (i.e. full control)
grep is a command that looks for expressions and prints them (literally: g/re/p ...get.. regular expression.. and print)
-A 13 is a flag telling grep to match something and also print the next 13 lines after whatever matches
lock_code is literally the phrase (the expression) we're looking for
/dev/mtd1 is the filename we're going to search through (in this case, a filehandle for Memory Technology Device subsystem number one in Linux)
| is a pipe that takes the output from the commands on the left and feeds it as input to the commands on the right
tail is a command that prints the last few lines of input
-1 is a flag telling the tail command to just print one line (the last line only)
I figured it might help to understand what it's doing to help get the command right.
The Following User Says Thank You to Serafin For This Useful Post: | ||
|
2011-09-18
, 14:34
|
|
Posts: 4,672 |
Thanked: 5,455 times |
Joined on Jul 2008
@ Springfield, MA, USA
|
#29
|
Just do you understand each part...
rootsh is telling the system to run the following as the root user (i.e. full control)
grep is a command that looks for expressions and prints them (literally: g/re/p ...get.. regular expression.. and print)
-A 13 is a flag telling grep to match something and also print the next 13 lines after whatever matches
lock_code is literally the phrase (the expression) we're looking for
/dev/mtd1 is the filename we're going to search through (in this case, a filehandle for Memory Technology Device subsystem number one in Linux)
| is a pipe that takes the output from the commands on the left and feeds it as input to the commands on the right
tail is a command that prints the last few lines of input
-1 is a flag telling the tail command to just print one line (the last line only)
I figured it might help to understand what it's doing to help get the command right.
|
2011-09-20
, 08:20
|
Posts: 2,802 |
Thanked: 4,491 times |
Joined on Nov 2007
|
#30
|
(1,$)g/regular expression/command list In the global command, the first step is to mark every line which matches the given regular expression. Then for every such line, the given command list is executed with `.' initially set to that line. A single command or the first of multiple commands appears on the same line with the global command. All lines of a multi- line list except the last line must be ended with `\'. A, i, and c commands and associated input are permitted; the `.' terminating input mode may be omitted if it would be on the last line of the command list. The commands g and v are not permitted in the com‐ mand list.
Tags |
buysomethinelse, nokia support |
|
do you mean in "tail"?
edit: I AM DUMB! I see it now!
Last edited by Serafin; 2011-09-18 at 01:28.