Last change
on this file since 130 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
File size:
612 bytes
|
Line | |
---|
1 | /* Author : Rick van der Zwet
|
---|
2 | * S-number : 0433373
|
---|
3 | * Version : $Id: memory.h 363 2007-12-03 06:07:31Z rick $
|
---|
4 | * Copyright : FreeBSD Licence
|
---|
5 | * Description : C sub of grep -e '^BUS2 '
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include <stdio.h>
|
---|
9 | #include <stdlib.h>
|
---|
10 | #include <sysexits.h>
|
---|
11 | #include <string.h>
|
---|
12 |
|
---|
13 |
|
---|
14 | int
|
---|
15 | main(int argc, char *argv[])
|
---|
16 | {
|
---|
17 | const int MAX_LINE = 128;
|
---|
18 | char line[MAX_LINE];
|
---|
19 |
|
---|
20 | /* Fetch line from stdin */
|
---|
21 | while (fgets(line, MAX_LINE, stdin) != NULL) {
|
---|
22 | /* Compare wether first part matches */
|
---|
23 | if ((strncmp(line, "BUS2 ", 5) ) == 0)
|
---|
24 | printf("%s",line);
|
---|
25 | }
|
---|
26 | exit(EX_OK);
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.