Patch-ID: bash41-003
[bash.git] / examples / loadables / necho.c
blobb5673894fa0c61ffef6ac757dd852dddef2ac33b
1 /* necho - echo without options or argument interpretation */
3 /* Sample builtin to be dynamically loaded with enable -f and replace an
4 existing builtin. */
6 /*
7 Copyright (C) 1999-2009 Free Software Foundation, Inc.
9 This file is part of GNU Bash.
10 Bash is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
15 Bash is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with Bash. If not, see <http://www.gnu.org/licenses/>.
24 #include <stdio.h>
25 #include "builtins.h"
26 #include "shell.h"
28 necho_builtin (list)
29 WORD_LIST *list;
31 print_word_list (list, " ");
32 printf("\n");
33 fflush (stdout);
34 return (EXECUTION_SUCCESS);
37 char *necho_doc[] = {
38 "Display arguments.",
39 "",
40 "Print the arguments to the standard ouput separated",
41 "by space characters and terminated with a newline.",
42 (char *)NULL
45 struct builtin necho_struct = {
46 "echo",
47 necho_builtin,
48 BUILTIN_ENABLED,
49 necho_doc,
50 "echo [args]",