42sh 1.0.0
Create a shell in C
Loading...
Searching...
No Matches
foreach.c File Reference

The file containing the foreach builtin. More...

Functions

char ** get_variable_content (mysh_t *mysh)
 Get the content of the variable.
 
void execute_command (mysh_t *mysh, char *command)
 Execute the command.
 
int exec_foreach (mysh_t *mysh)
 The foreach builtin.
 

Detailed Description

The file containing the foreach builtin.

Function Documentation

◆ exec_foreach()

int exec_foreach ( mysh_t * mysh)

The foreach builtin.

Parameters
myshThe shell structure
Returns
int 0 if the command succeed, 1 otherwise

◆ execute_command()

void execute_command ( mysh_t * mysh,
char * command )

Execute the command.

Parameters
myshThe shell structure
commandThe command to execute
Returns
void

◆ get_variable_content()

char ** get_variable_content ( mysh_t * mysh)

Get the content of the variable.

Parameters
myshThe shell structure
Returns
char ** The content of the variable