| www.delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| X-Virus-Scanned: | by amavisd-new (Uni-Kiel/l4ms-sc) |
| From: | geda AT psjt DOT org (Stephan =?utf-8?Q?B=C3=B6ttcher?=) |
| To: | "Matt Rhys-Roberts \(matt.rhys-roberts\@envinsci.co.uk\) \[via geda-user\@delorie.com\]" <geda-user AT delorie DOT com> |
| Subject: | Re: [geda-user] Searching for refdes's having a specific attribute? |
| References: | <568F9808 DOT 5040808 AT envinsci DOT co DOT uk> |
| Date: | Fri, 08 Jan 2016 14:20:41 +0100 |
| In-Reply-To: | <568F9808.5040808@envinsci.co.uk> (Matt Rhys-Roberts's message of |
| "Fri, 8 Jan 2016 11:05:44 +0000") | |
| Message-ID: | <s6ny4c0ryvq.fsf@falbala.ieap.uni-kiel.de> |
| User-Agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
| MIME-Version: | 1.0 |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id u08DKrrb003088 |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
"Matt Rhys-Roberts (matt DOT rhys-roberts AT envinsci DOT co DOT uk) [via
geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> writes:
> 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.
I'd use awk
$ awk '/^refdes=/{R=$0};/^value=10M/{print FILENAME, R, $0}' *.sch
CSA-Beau-F.sch refdes=R1 value=10MΩ
CSA-Beau-F.sch refdes=R51 value=10MΩ
eptpreamps.sch refdes=R13 value=10MΩ
eptpreamps.sch refdes=R14 value=10MΩ
eptpreamps.sch refdes=R15 value=10MΩ
eptpreamps.sch refdes=R16 value=10MΩ
hetpreamps.sch refdes=R13 value=10MΩ
hetpreamps.sch refdes=R14 value=10MΩ
hetpreamps.sch refdes=R15 value=10MΩ
hetpreamps.sch refdes=R16 value=10MΩ
--
Stephan
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |