Page 1 of 1

Grep cannot jump to line.

Posted: Tue Apr 03, 2007 3:33 pm
by PSinc
I recently upgraded my textpad. I am running version 5.0.

Since upgrading my command line tools for grep are no longer working properly.

Under 4.7.3 the following setup worked perfectly, however now it gives me the results in the "tool output" quickly, however it will not jump to the line.

My settings are below:

Command: grep -n-i "$Selword" $File
Regex: ^\\([[:digit:]]+\\):
File: blank
Line: 1
Column: 0

The return results have the line number and the entire string for each line. The return results are exactly the same as that which came back from version 4.7.3, just does not work!

Any :idea: ?

Thanks.
P

Posted: Tue Apr 03, 2007 4:54 pm
by ben_josephs
What do the lines output by your grep look like? Your regular expression indicates that they contain backslashes, which seems a little unlikely.

If you're using Posix regular expression syntax, your grep lines would have to look like this to match:
\42\:a line of text

If you're not using Posix regular expression syntax, your grep lines would have to look like this to match:
\(42\):a line of text

Quite peculiar, either way.

You can change the Posix regular expression syntax setting with
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax

Posted: Tue Apr 03, 2007 5:13 pm
by PSinc
Here is the output when greping for taskname:

11: command = {TASKNAME=ProcessTask INTIME=1200 MCSRCP=NMP-HT-R}
24: command = {TASKNAME=ProcessTask INTIME=120 MCSRCP=ACE}
37: command = {TASKNAME=ProcessTask INTIME=120 MCSRCP=IPA}
51: command = {TASKNAME=QDRTask INTIME=300 MCSRCP=TQDR}
64: command = {TASKNAME=ProcessTask INTIME=120 MCSRCP=IPA}
78: command = {TASKNAME=ProcessTask INTIME=EOC MCSRCP=New_vjd}

I am already using POSIX.

:roll:

Posted: Tue Apr 03, 2007 5:16 pm
by ben_josephs
The regex you gave before couldn't have worked. Try
^([0-9]+):

Posted: Tue Apr 03, 2007 5:16 pm
by PSinc
Just dawned on me....

My regular expression should have been....
^([[:digit:]]+):

Thanks for the response, made me think...

This problem has raised it's head again.

Posted: Wed Jan 16, 2013 3:19 pm
by PSinc
This time it appears to be related to Version 6.2.2.

I have reverted back to 5.4.2 and it works again as before.

After confirming operation in 5.4.2 I then upgraded it to 6.2.2 thinking possibly an upgrade might carry over the 5.4.2 functionality. Not so.

Something is broken in this release, but possibly sooner.

Regards,
PSinc