[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Renumbering Reference Designators
On Jan 14, 2009, at 10:32 PM, Kipton Moravec wrote:
> is there an easy way to change all reference designators
> from <Letter> <Number> to <Letter> <?> so I can renumber?
sed -e 's/\(refdes=[A-Za-z].\)[0-9]*$/\1?/' old.sch >new.sch
This creates new.sch from old.sch with all of the numeric suffixes on
the refdeses changed to "?". It works on refdeses composed of one or
more letters followed by zero or more digits. Any that don't match
that pattern are left alone.
Composing these isn't as hard as it looks. I learned to use "regular
expressions" in an evening in 1970, and I bet they have saved me
thousands of hours of work since. There are so many problems a
simple, automated text transformation can make short work of.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd@xxxxxxxxx
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user