28 lines
1.2 KiB
C++
28 lines
1.2 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* main.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/11/05 18:11:15 by adjoly #+# #+# */
|
|
/* Updated: 2024/11/07 18:46:40 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "sed.h"
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
int main(int ac, char **av) {
|
|
if (!(ac > 2 && ac <= 4))
|
|
return (std::cerr << "Invalid number of args please only give ./sed <infile> <s1> <s2>" << std::endl, 1);
|
|
|
|
std::string infile = av[1];
|
|
std::string s1 = av[2];
|
|
std::string s2 = av[3];
|
|
Sed sed(infile, s1, s2);
|
|
|
|
return (0);
|
|
}
|