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

The file containing the scripting functions. More...

Functions

void remove_comments (char *line)
 Remove the comments from a line.
 
int read_file_in_stdin (char *file)
 Read a file and execute the commands in it.
 

Detailed Description

The file containing the scripting functions.

Function Documentation

◆ read_file_in_stdin()

int read_file_in_stdin ( char * file)

Read a file and execute the commands in it.

Parameters
fileThe file path
Returns
int 0 if success, 1 if an error occurred

◆ remove_comments()

void remove_comments ( char * line)

Remove the comments from a line.

Parameters
lineThe line
Returns
void