Mail Archives: geda-user/2016/01/08/08:22:10
Thanks Michael... Hmm, it'll be interesting. The number of lines between
the refdes=xxx and OrderCode=yyy lines, varies in number and sequence.
So outputting via grep would need a blanket number of pre-match context
and post-match context lines to include. It'd be messy :)
For now I'll just use grep to locate which .sch files contain the
specific order code, then hop around the schematic in gschem using
Attributes->FindSpecificText .
Regards,
Matt.
On 08/01/16 11:16, M. J. Everitt (m DOT j DOT everitt AT iee DOT org) [via
geda-user AT delorie DOT com] wrote:
> Now this is where the power of the raw text file comes into play. I
> suggest you look at 'grep' which is a standard text utility in linux,
> and will allow you to filter your schematics. You will probably need
> some context (-A/-B/-C) in your grep command to give you all the
> important information, but you can then process this to give you your list.
>
> If you need some help, drop me a line.
>
> Best regards,
>
> Michael.
>
> On 08/01/16 11:05, Matt Rhys-Roberts (matt DOT rhys-roberts AT envinsci DOT co DOT uk)
> [via geda-user AT delorie DOT com] wrote:
>> How could I search a directory of .sch schematic sheets for components
>> that contain a specific attribute, e.g. OrderCode=1234567, please?
>> Basically, I need to fit components manually to a board, one specific
>> type at a time, to keep production neat. So I need to list them by
>> unique order code, ideally.
>>
>> The search function would have to know how to navigate to and fro
>> within each component's curly brackets in the .sch file, to find which
>> component that attribute value belongs to. So I guess a perl script
>> might already exist for this?
>>
>> Gattrib doesn't let me sort by column, which would have been useful
>> for this. Maybe there's an obvious and easier way to do what I'm
>> trying to do...
- Raw text -