Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line number 1

Status
Not open for further replies.

lambros

Programmer
Oct 10, 2002
42
0
0
US
Hi,

If I have something like -

if ($0 ~ /Error/)
how can I assign this line a line number;

is something like - nl -nrz -v5 -i5 possible to do to this?
 
if ($0 ~ /Error/) { arr[$0]=FNR }

or

if ($0 ~ /Error/) { arr[FNR]=$0}

depending on WHAT you want to do vlad
+----------------+
| #include<disclaimer.h> |
+----------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top