minor comment fixes for ouiparse.awk

Поиск
Список
Период
Сортировка
От Larry Rosenman
Тема minor comment fixes for ouiparse.awk
Дата
Msg-id 20000823074558.A4110@lerami.lerctr.org
обсуждение исходный текст
Список pgsql-hackers
Here's a quick patch for contrib/mac/ouiparse.awk to fix some commenting
changes due to Thomas' updates.


*** ouiparse.awk.old    Wed Aug 23 01:02:23 2000
--- ouiparse.awk    Wed Aug 23 07:44:09 2000
***************
*** 10,19 **** #        manufacturer text); # the table name is set by setting the AWK variable TABLE # 
! # we translate the character apostrophe (') to space inside the company name
! # to avoid SQL errors. #
- # match ONLY lines that begin with 2 hex numbers, -, and another hex number  BEGIN {     TABLE="macoui";
--- 10,18 ---- #        manufacturer text); # the table name is set by setting the AWK variable TABLE # 
! # we translate the character apostrophe (') to double apostrophe ('') inside 
! # the company name to avoid SQL errors. #  BEGIN {     TABLE="macoui";
***************
*** 27,32 ****
--- 26,32 ----     printf "COMMIT TRANSACTION;"; } 
+ # match ONLY lines that begin with 2 hex numbers, -, and another hex number /^[0-9a-fA-F][0-9a-fA-F]-[0-9a-fA-F]/ {
#   if (nrec >= 100) { #        printf "COMMIT TRANSACTION;";
 
***************
*** 47,53 ****         Company=Company " " $i;     # Modify any apostrophes (') to avoid grief below.
gsub("'","''",Company);
!     # Print out for the 'C' structure in mac.c     printf "INSERT INTO %s (addr, name) VALUES (trunc(macaddr
\'%s\'),\'%s\');\n",        TABLE,OUI,Company; }
 
--- 47,53 ----         Company=Company " " $i;     # Modify any apostrophes (') to avoid grief below.
gsub("'","''",Company);
!     # Print out for the SQL table insert     printf "INSERT INTO %s (addr, name) VALUES (trunc(macaddr
\'%s\'),\'%s\');\n",        TABLE,OUI,Company; }
 
-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jerome Raupach
Дата:
Сообщение: Problem with insert
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: minor comment fixes for ouiparse.awk