Livl Shell  0.1
Livl Shell is an intermediate reimplementation of the bash shell in C language.
redirection.h
Go to the documentation of this file.
1 
7 #ifndef REDIRECTION_H
8 #define REDIRECTION_H
9 
10 #include "typedef.h"
11 #include <fcntl.h>
12 #include <sys/stat.h>
13 #include <stdio.h>
14 #include <unistd.h>
15 #include <string.h>
16 #include <stdlib.h>
17 #include <sys/wait.h>
18 
23 void handle_input_redirection(const Command *command);
24 
29 void handle_output_redirection(const Command *command);
30 
36 
42 void execute_pipe(Command *cmd1, Command *cmd2);
43 
49 int is_redirection_command(const Command *command);
50 
51 #endif //REDIRECTION_H
evaluate_redirection
void evaluate_redirection(CommandSequence *sequence)
Evaluate if a command sequence contains stream redirection operators.
Definition: redirection.c:55
CommandSequence
Struct that represents a command sequence.
Definition: typedef.h:123
is_redirection_command
int is_redirection_command(const Command *command)
Evaluate if a command is a stream redirection command.
Definition: redirection.c:106
Command
Struct that represents a command.
Definition: typedef.h:97
handle_input_redirection
void handle_input_redirection(const Command *command)
Handles input redirection with '<' operator with '<<' operator.
Definition: redirection.c:3
execute_pipe
void execute_pipe(Command *cmd1, Command *cmd2)
Execute a command with pipe operator.
Definition: redirection.c:111
typedef.h
File containing all the typedefs used in the shell program.
handle_output_redirection
void handle_output_redirection(const Command *command)
Handles output redirection with '>' operator with '>>' operator.
Definition: redirection.c:42