Grep cannot jump to line.

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
PSinc
Posts: 9
Joined: Tue Apr 03, 2007 3:15 pm

Grep cannot jump to line.

Post 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
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post 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
PSinc
Posts: 9
Joined: Tue Apr 03, 2007 3:15 pm

Post 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:
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

The regex you gave before couldn't have worked. Try
^([0-9]+):
Last edited by ben_josephs on Tue Apr 03, 2007 5:16 pm, edited 1 time in total.
PSinc
Posts: 9
Joined: Tue Apr 03, 2007 3:15 pm

Post by PSinc »

Just dawned on me....

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

Thanks for the response, made me think...
PSinc
Posts: 9
Joined: Tue Apr 03, 2007 3:15 pm

This problem has raised it's head again.

Post 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
Post Reply