MiniDevil
As beautiful as a shell
Implements echo: prints arguments with optional -n flag.
More...
Include dependency graph for builtin_echo.c:Implements echo: prints arguments with optional -n flag.
Definition in file builtin_echo.c.
Functions | |
| static int | is_n_flag (char *arg) |
| Check if a given argument is a valid -n flag. More... | |
| int | builtin_echo (char **args) |
Implement the echo command. More... | |
|
static |
Check if a given argument is a valid -n flag.
A valid n flag starts with - followed by 1 or more n characters
| arg | Argument string to check |
Definition at line 24 of file builtin_echo.c.
Referenced by builtin_echo().
Here is the caller graph for this function:| int builtin_echo | ( | char ** | args | ) |
Implement the echo command.
This command prints arguments separated by spaces and supports:
| args | NULL terminated arg array with arg[0] = "echo" |
Definition at line 52 of file builtin_echo.c.
References is_n_flag().
Referenced by exec_builtin().
Here is the call graph for this function:
Here is the caller graph for this function: