Back

GitHub


Minishell

Summary

Is an group project about creating a basic shell program that allows users to execute commands, this includes running external programs, built-in commands, and handling command-line arguments, manage processes, and handle basic shell functionalities as:

int
ft_echo(t_cmd **cmd)
{
	int	i = 0;
	bool n_flag = false;

	if (!(*cmd)->arg && write(1, "\n", 1))
		return (0);
	while ((*cmd)->arg[i] && is_n_flag((*cmd)->arg[i])) {
		n_flag = true;
		i++;
	}
	while ((*cmd)->arg[i]) {
		putstr((*cmd)->arg[i]);
		if ((*cmd)->arg[i])
			write(1, " ", 1);
		i++;
	}
	if (!n_flag)
		write(1, "\n", 1);
	return (0);
}

Introduction

The existence of shells is linked to the very existence of IT.

At the time, all developers agreed that communicating with a computer using aligned 1/0 switches was seriously irritating.

It was only logical that they came up with the idea of creating a software to com- municate with a computer using interactive lines of commands in a language somewhat close to the human language.

Thanks to Minishell, you’ll be able to travel through time and come back to problems people faced when Windows didn’t exist.

Mandatory part

Write a shell that:

Bonus part

Your program has to implement: