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

The file containing the backticks functions. More...

Functions

int check_unmatched (mysh_t *mysh, char *line)
 Check if the backticks are matched.
 
char * exec_command_in_backticks (mysh_t *mysh, char *line)
 Execute the command in backticks.
 
void analyse_backticks (mysh_t *mysh, char *line)
 Analyse and execute backticks commands.
 

Detailed Description

The file containing the backticks functions.

Function Documentation

◆ analyse_backticks()

void analyse_backticks ( mysh_t * mysh,
char * line )

Analyse and execute backticks commands.

Parameters
myshThe shell structure
lineThe command line
Returns
void

◆ check_unmatched()

int check_unmatched ( mysh_t * mysh,
char * line )

Check if the backticks are matched.

Parameters
myshThe shell structure
lineThe command line
Returns
int -1 if the backticks are not matched, the number of commands in backticks otherwise

◆ exec_command_in_backticks()

char * exec_command_in_backticks ( mysh_t * mysh,
char * line )

Execute the command in backticks.

Parameters
myshThe shell structure
lineThe command line to execute
Returns
char * The result of the command