Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. Error: foo.file on line wxy
  2. Error: foo.file on line xyz
  3. .
  4. .
  5. .
  6.  
  7. function abc_1234 (...)
  8. .
  9. .
  10. .
  11.  
  12.  
  13. endfunction
  14.  
  15. function def_442 ()
  16. .
  17. .
  18. .
  19. //Following line number is WXY
  20. assign Z ==== X;
  21.  
  22. endfunction
  23.  
  24.  
  25. function ghi(...)
  26. .
  27. .
  28. .
  29.  
  30.  
  31. //Following line number is XYZ
  32. assign X = X;
  33. endfunction
  34.  
  35. .
  36. .
  37. .
  38.  
  39. # look for function definitions and record the function name
  40. # in the func_name variable
  41. /function [[:alpha:]][[:alnum:]]*[[:blank:]]*([^)]*)/ {
  42. func_name = substr($2, 1, index($2, "(")-1);
  43. }
  44.  
  45. # when we reach the target line number, print out the current
  46. # value of func_name
  47. NR == target {
  48. print func_name
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement