Code Monkey home page Code Monkey logo

42_pipex's Introduction

42_Network_Amsterdam

Pipex mikuiper's 42 pipex Score

๐Ÿ“– About the project

Summary: This project will let you discover in detail a UNIX mechanism that you already know by using it in your program.

Goals: This project aims to make you understand a bit deeper two concepts that you already know: the redirections and the pipes. It is an introduction project.

Program name pipex
Turn in files Makefile, *.h, *.c, maps
Makefile NAME, all, clean, fclean, re
External functs.
  • open, close, read, write, malloc, free, perror, strerror, access, dup, dup2, execve, exit, fork, pipe, unlink, wait, waitpid
  • ft_printf and any equivalent YOU coded
Libft authorized Yes
Description This project is about handling pipes.

ย 

Overview

pipex, an emulation program of <, |, >, heredoc, <<, and >> in CLI, executes shell commands passed as arguments and redirects the result to the other file.

๐Ÿ› ๏ธ Building

gcc -o pipex *.c -Llibft -lft

๐Ÿƒ Running

git clone the repository and execute the make command inside the cloned directory.

$ ./pipex <file1> <cmd1> <cmd2> ... <cmdn> <file2>
# Works as $ < <file1> <cmd1> | <cmd2> > file2

$ ./pipex here_doc <LIMITER> <cmd1> <cmd2> <file>
# Works as $ <cmd1> << <LIMITER> | <cmd2> >> <file>

Examples

./pipex infile "grep foo" "wc -l" outfile
./pipex infile cat cat cat cat cat outfile
./pipex here_doc END "grep foo" "wc -l" outfile

Questions?

Please connect with me on LinkedIn or send an e-mail.

42_pipex's People

Contributors

mithraskuipers avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.