Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
87523ab8
Commit
87523ab8
authored
Aug 23, 2000
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment fixes from Larry Rosenman" <ler@lerctr.org>.
parent
8a35cbe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
contrib/mac/ouiparse.awk
contrib/mac/ouiparse.awk
+5
-5
No files found.
contrib/mac/ouiparse.awk
View file @
87523ab8
# $Id: ouiparse.awk,v 1.
1 2000/08/23 06:02:23
thomas Exp $
# $Id: ouiparse.awk,v 1.
2 2000/08/23 13:44:14
thomas Exp $
#
#
# ouiparse.awk
# ouiparse.awk
# Author: Lawrence E. Rosenman <ler@lerctr.org>
# Author: Lawrence E. Rosenman <ler@lerctr.org>
...
@@ -10,10 +10,9 @@
...
@@ -10,10 +10,9 @@
# manufacturer text);
# manufacturer text);
# the table name is set by setting the AWK variable TABLE
# the table name is set by setting the AWK variable TABLE
#
#
# we translate the character apostrophe (') to
space inside the company name
# we translate the character apostrophe (') to
double apostrophe ('') inside
# to avoid SQL errors.
# t
he company name t
o avoid SQL errors.
#
#
# match ONLY lines that begin with 2 hex numbers, -, and another hex number
BEGIN
{
BEGIN
{
TABLE
=
"macoui"
;
TABLE
=
"macoui"
;
...
@@ -27,6 +26,7 @@ END {
...
@@ -27,6 +26,7 @@ END {
printf
"COMMIT TRANSACTION;"
;
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
]
/
{
/^
[
0-9a-fA-F
][
0-9a-fA-F
]
-
[
0-9a-fA-F
]
/
{
# if (nrec >= 100) {
# if (nrec >= 100) {
# printf "COMMIT TRANSACTION;";
# printf "COMMIT TRANSACTION;";
...
@@ -47,7 +47,7 @@ END {
...
@@ -47,7 +47,7 @@ END {
Company
=
Company
" "
$i
;
Company
=
Company
" "
$i
;
# Modify any apostrophes (') to avoid grief below.
# Modify any apostrophes (') to avoid grief below.
gsub
(
"'"
,
"''"
,
Company
);
gsub
(
"'"
,
"''"
,
Company
);
# Print out for the
'C' structure in mac.c
# Print out for the
SQL table insert
printf
"INSERT INTO %s (addr, name) VALUES (trunc(macaddr \'%s\'),\'%s\');\n"
,
printf
"INSERT INTO %s (addr, name) VALUES (trunc(macaddr \'%s\'),\'%s\');\n"
,
TABLE
,
OUI
,
Company
;
TABLE
,
OUI
,
Company
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment