42-archive/42sh/42ShellTester/support/display-program-name
2017-03-24 17:43:33 +01:00
..
description with 42shelltester error 2017-03-24 17:43:33 +01:00
main.c with 42shelltester error 2017-03-24 17:43:33 +01:00
Makefile with 42shelltester error 2017-03-24 17:43:33 +01:00
README.md with 42shelltester error 2017-03-24 17:43:33 +01:00

./display_program_name

A binary that writes its name on standard ouput.

#include <unistd.h>
#include <string.h>

int	main(int ac, char **av)
{
	(void)ac;
	write(1, av[0], strlen(av[0]));
	write(1, "\n", 1);
	return (0);
}