1 This file is eval.def, from which is created eval.c.
2 It implements the builtin "eval" in Bash.
4 Copyright (C) 1987-2002 Free Software Foundation, Inc.
6 This file is part of GNU Bash, the Bourne Again SHell.
8 Bash is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2, or (at your option) any later
13 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License along
19 with Bash; see the file COPYING. If not, write to the Free Software
20 Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
25 $FUNCTION eval_builtin
26 $SHORT_DOC eval [arg ...]
27 Read ARGs as input to the shell and execute the resulting command(s).
31 #if defined (HAVE_UNISTD_H)
33 # include <sys/types.h>
39 #include "bashgetopt.h"
42 /* Parse the string that these words make, and execute the command found. */
47 if (no_options (list))
49 list = loptend; /* skip over possible `--' */
51 /* Note that parse_and_execute () frees the string it is passed. */
52 return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);