Last change
on this file was 3231, checked in by bird, 18 years ago |
eol style.
|
-
Property svn:eol-style
set to
native
|
File size:
620 bytes
|
Line | |
---|
1 | /* necho - echo without options or argument interpretation */
|
---|
2 |
|
---|
3 | /* Sample builtin to be dynamically loaded with enable -f and replace an
|
---|
4 | existing builtin. */
|
---|
5 |
|
---|
6 | #include <stdio.h>
|
---|
7 | #include "builtins.h"
|
---|
8 | #include "shell.h"
|
---|
9 |
|
---|
10 | necho_builtin (list)
|
---|
11 | WORD_LIST *list;
|
---|
12 | {
|
---|
13 | print_word_list (list, " ");
|
---|
14 | printf("\n");
|
---|
15 | fflush (stdout);
|
---|
16 | return (EXECUTION_SUCCESS);
|
---|
17 | }
|
---|
18 |
|
---|
19 | char *necho_doc[] = {
|
---|
20 | "Print the arguments to the standard ouput separated",
|
---|
21 | "by space characters and terminated with a newline.",
|
---|
22 | (char *)NULL
|
---|
23 | };
|
---|
24 |
|
---|
25 | struct builtin necho_struct = {
|
---|
26 | "echo",
|
---|
27 | necho_builtin,
|
---|
28 | BUILTIN_ENABLED,
|
---|
29 | necho_doc,
|
---|
30 | "echo [args]",
|
---|
31 | 0
|
---|
32 | };
|
---|
33 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.