/usr/share/lifelines/search_source.ll is in lifelines-reports 3.0.61-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | /*
* @progname search_source.ll
* @version 1.0
* @author Stephen Dum
* @category
* @output text
* @description
Search source records for a particular string.
Program prompts for the type of sub record to search
and then for string to search for. If no sub record type is
entered, all records are searched. Case is ignored in searches.
by Stephen Dum (stephen.dum@verizon.net)
Version 1 July 2006
*/
option("explicitvars")
proc main()
{
getstr(search,"Enter type of SOUR sub records searched(e.g. TITL, AUTH) <return> for all")
set(search,upper(search))
getstr(match,"Enter string to search for")
set(match,lower(match))
forsour(n,i){
if (strlen(search)) {
/* only search children of this source where tag is search */
fornodes(n,ch) {
if (eqstr(tag(ch),search)) {
set(v,value(ch))
if (i,index(lower(v),match,1)) {
/*
print ("Found in ",xref(n)," ",v,"\n")
*/
print ("Found in ",xref(n),": ")
print (d(level(ch))," ")
if (strlen(xref(ch))) {
print (xref(ch)," ")
}
print(tag(ch)," ",lower(v),"\n")
}
}
}
} else {
traverse(n,ch,i) {
set(v,value(ch))
if (i,index(lower(v),match,1)) {
/*
print ("Found in ",xref(n)," ",v,"\n")
*/
print ("Found in ",xref(n),": ")
print (d(level(ch))," ")
if (strlen(xref(ch))) {
print (xref(ch)," ")
}
print(tag(ch)," ",lower(v),"\n")
}
}
}
}
}
|