denisgodoy / 42-pipex

Simulating the pipe and redirection shell commands in C. An introductory project for bigger UNIX projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unix ImperativeProgramming

pipex đź’»

Simulating the pipe and redirection shell commands in C. An introductory project for bigger UNIX projects.

Evaluation

image badge

Mandatory part

Program Description Libraries External functions
pipex Produces output to outfile after the execution of two shell commands, simulating pipe and redirection. fcntl.h, stdlib.h, unistd.h, sys/types.h, sys/wait.h, string.h access, open, write, unlink, close, malloc, waitpid, free, pipe, dup2, execve, fork, strerror, exit
< infile cmd1 | cmd2 > outfile #real usage
./pipex infile "cmd1" "cmd2" outfile #program usage

Clone and compile:

git clone https://github.com/denisgodoy/42-pipex.git pipex
cd pipex
make all

Create an infile with the content you want, choose two commands and execute the program:

./pipex infile "ls -la" "wc -l" outfile

About

Simulating the pipe and redirection shell commands in C. An introductory project for bigger UNIX projects.


Languages

Language:C 97.2%Language:Makefile 2.8%