in reply to GREP or any other simpler way???
It is not so hard! :-)
You can read the file line-by-line and check each line if your keyword, a colon and a number are contained. This can be done by a pattern-matching using a regex. The tricky thing is to find a siutable regex. In your case I would start with:
If you have your line in a variable called $line, you could write/Input\s+:\s+(\d+)/;
if ($line =~ /Input\s+:\s+(\d+)/) { print $1," is the value of Input"; + }
You can find further reading on Regular expressions/pattern-matching in this collection by planetscape.
HTH, Rata
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: GREP or any other simpler way???
by Anonymous Monk on Oct 12, 2010 at 07:25 UTC |