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

The file containing the redirections functions. More...

Functions

char * get_redirection_path (char *line)
 Browse the command line to get the redirection path.
 
int missing_name (mysh_t *mysh, char **commands)
 Display the error message when the name is missing.
 
void select_redirections (mysh_t *mysh, input_command_t *input)
 Analyse and execute the good redirection.
 

Detailed Description

The file containing the redirections functions.

Function Documentation

◆ get_redirection_path()

char * get_redirection_path ( char * line)

Browse the command line to get the redirection path.

Parameters
lineThe command line
Returns
char * The redirection path

◆ missing_name()

int missing_name ( mysh_t * mysh,
char ** commands )

Display the error message when the name is missing.

Parameters
myshThe shell structure
commandsThe command line
Returns
int Always 1

◆ select_redirections()

void select_redirections ( mysh_t * mysh,
input_command_t * input )

Analyse and execute the good redirection.

Parameters
myshThe shell structure
inputThe input command
Returns
void