Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

This project is part of the curriculum at Ecole 42. "42_pipex" is a program that simulates the functionality of the shell command pipeline.

NotificationsYou must be signed in to change notification settings

cypri1-dev/42_pipex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Thepipex program takes four arguments:

  • infile: the input file to be read and piped into the first command.
  • cmd1: the first command to be executed.
  • cmd2: the second command to be executed.
  • outfile: the output file where the result of the pipeline will be written.

The program executes the command pipelinecmd1 | cmd2 and redirects the input and output accordingly, similar to the behavior of the shell command| (pipe).

Projects Components Table

This is an overview of the main components located in the "sources" directory of the 42_pipex project.

File/Header FileDescription
libftA directory containing the Libft library, used for auxiliary functions required for the implementation of pipex.
MakefileThe Makefile script for automating project compilation. It includes rules for compiling pipex and additional rules for project management.
sources/pipex.cThe main file containing the pipex function, responsible for executing the command pipeline and file redirection.
sources/utils.cContains utility functions used by the pipex program for tasks such as string manipulation and error handling.
sources/pipex.hThe header file containing function prototypes and macro declarations necessary for using the pipex program.

Usage

To use thepipex program, compile it using the provided Makefile. Then, run the program with the required arguments:

./pipex infile"cmd1""cmd2" outfile

Features

42_pipex offers the following features:

  • Command Pipeline Simulation: Executes the command pipelinecmd1 | cmd2 to simulate the behavior of shell pipes.

  • File Redirection: Redirects input and output files as specified by the user to facilitate the execution of the command pipeline.

  • Error Handling: Properly handles errors and returns appropriate exit codes in case of failure.

About

This project is part of the curriculum at Ecole 42. "42_pipex" is a program that simulates the functionality of the shell command pipeline.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp