521ee2c6df950f845e7c798db1b969cacfce3d15
[platform/upstream/bash.git] / examples / loadables / necho.c
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