Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error: foo.file on line wxy
- Error: foo.file on line xyz
- .
- .
- .
- function abc_1234 (...)
- .
- .
- .
- endfunction
- function def_442 ()
- .
- .
- .
- //Following line number is WXY
- assign Z ==== X;
- endfunction
- function ghi(...)
- .
- .
- .
- //Following line number is XYZ
- assign X = X;
- endfunction
- .
- .
- .
- # look for function definitions and record the function name
- # in the func_name variable
- /function [[:alpha:]][[:alnum:]]*[[:blank:]]*([^)]*)/ {
- func_name = substr($2, 1, index($2, "(")-1);
- }
- # when we reach the target line number, print out the current
- # value of func_name
- NR == target {
- print func_name
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement