If MARCgrep doesn't do everything you want, you should be able to extract the data you wish to operate on and build up a pipeline to filter the results. If you want different types of numbers, you may have to build up a few different pipelines.
For example (and this is not tested), if you want a count of all values is positions 7 8 9 in the 100‡a, you could do something like: marcgrep.pl -e '100,,,a,' | # select the 100‡a's cut -c 7-9 | # get only character positions 7-9 sort | # sort all of the values uniq -c # print a count of value -Tod On May 16, 2013, at 6:07 AM, dasos ili <[email protected]> wrote: > but this code cannot tell me how many times the gre value in subfield $a, > character position 7 8 9 for example > > > > > ________________________________ > Απο: Tod Olson <[email protected]> > Προς: [email protected] > Στάλθηκε: 1:55 μ.μ. Πέμπτη, 16 Μαΐου 2013 > Θέμα: Re: [CODE4LIB] Σχετ: [CODE4LIB] How get coded data values in unimarc > format via code > > > Try the -e switch on MARCgrep. > > -Tod > > On May 16, 2013, at 5:38 AM, dasos ili <[email protected]> > wrote: > >> i suppose there is not anything to retrieve the values of the subfields $a, >> etc >> >> >> >> >> ________________________________ >> Απο: Stefano Bargioni <[email protected]> >> Προς: [email protected] >> Στάλθηκε: 1:28 μ.μ. Πέμπτη, 16 Μαΐου 2013 >> Θέμα: Re: [CODE4LIB] How get coded data values in unimarc format via code >> >> >> Tool <http://en.pusc.it/bib/MARCgrep> can help you. >> Bye. Stefano >> >> On 16/mag/2013, at 12.01, dasos ili wrote: >> >>> Greetings dear all, >>> >>> Let's say we have a file with many records in unimarc format, or Marc, it >>> is almost the same. >>> >>> could you please send me a hint on how get all coded data values for >>> example for the fields 100, 101 102, for instance we would like to have the >>> info: 100 appears 387 times, $a position character 8 length 1 appears 300 >>> times, etc... you could use any language as an example. Thank you >>> >>>
