Add touch
This commit is contained in:
parent
0c5f04cf56
commit
147b52eed9
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
*
|
||||
!.gitignore
|
||||
!cat.c
|
||||
!touch.c
|
||||
!yes.c
|
||||
!Makefile
|
||||
|
@ -2,10 +2,11 @@ CC = gcc
|
||||
CFLAGS= -Wall -Wextra
|
||||
LFLAGS=
|
||||
|
||||
all: cat yes
|
||||
all: cat touch yes
|
||||
|
||||
main: $(OBJFILES)
|
||||
$(CC) cat.c -o cat
|
||||
$(CC) touch.c -o touch
|
||||
$(CC) yes.c -o yes
|
||||
|
||||
test: main
|
||||
|
8
src/touch.c
Normal file
8
src/touch.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
for (int i = 1; i < argc; i++) {
|
||||
FILE *file = fopen(argv[i], "w");
|
||||
fclose(file);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user