Re: [dev] show line number *and* column number in a search

2022-07-02 Thread Marc Chantreux
On Mon, Jun 20, 2022 at 09:02:13AM -0400, Greg Reagle wrote: > On Mon, Jun 20, 2022, at 3:00 AM, m...@datameer.com wrote: > > "Greg Reagle" wrote: > >> ls | awk '/er.*/ {match($0, /er.*/); print $0; print > >> NR":"RSTART"-"RSTART+RLENGTH}' > > [0] https://geoff.greer.fm/ag/ you don't need

Re: [dev] show line number *and* column number in a search

2022-06-20 Thread Κράκ Άουτ
Στις 20 Ιουν 2022 16:02, ο/η Greg Reagle έγραψε: On Mon, Jun 20, 2022, at 3:00 AM, m...@datameer.com wrote: "Greg Reagle" wrote: ls | awk '/er.*/ {match($0, /er.*/); print $0; print NR":"RSTART"-"RSTART+RLENGTH}' debfoster-a-notes.txt 3:8-22 vdirsyncer 21:9-11 So there is a match on line 3

Re: [dev] show line number *and* column number in a search

2022-06-20 Thread Greg Reagle
On Mon, Jun 20, 2022, at 3:00 AM, m...@datameer.com wrote: > "Greg Reagle" wrote: >> ls | awk '/er.*/ {match($0, /er.*/); print $0; print >> NR":"RSTART"-"RSTART+RLENGTH}' >> debfoster-a-notes.txt >> 3:8-22 >> vdirsyncer >> 21:9-11 >> >> So there is a match on line 3 columns 8-22 and line 21

Re: [dev] show line number *and* column number in a search

2022-06-20 Thread Nikolay Korotkiy
m...@datameer.com kirjoitti 20.6.2022 klo 10.00: "Greg Reagle" wrote: ls | awk '/er.*/ {match($0, /er.*/); print $0; print NR":"RSTART"-"RSTART+RLENGTH}' debfoster-a-notes.txt 3:8-22 vdirsyncer 21:9-11 So there is a match on line 3 columns 8-22 and line 21 columns 9-11. Exactly what I

Re: [dev] show line number *and* column number in a search

2022-06-20 Thread mb
"Greg Reagle" wrote: > ls | awk '/er.*/ {match($0, /er.*/); print $0; print > NR":"RSTART"-"RSTART+RLENGTH}' > debfoster-a-notes.txt > 3:8-22 > vdirsyncer > 21:9-11 > > So there is a match on line 3 columns 8-22 and line 21 columns 9-11. Exactly > what I want. I am curious though, is there a

[dev] show line number *and* column number in a search

2022-06-18 Thread Greg Reagle
Greetings. The compiler I've been using recently very helpfully provides the line number *and* column number in warnings and error messages. I would like to be able to search a file and see both numbers. Note that I am not interested in doing this within any particular editor--I imagine it