repeat.git


repeat

~ repeat a command n times
git clone https://github.com/djnnvx/repeat.git
log | files | refs | archive | README

repeat.h (461B)

      1 
      2 
      3 /*
      4     djnn.sh ~ repeat
      5 
      6     version 0.1.1
      7 
      8 
      9     this is an uber-simple CLI function to repeat a command n times.
     10     if one of the commands fails, it will stop.
     11 
     12     Example:
     13 
     14         repeat 5 printf "hello\n"
     15 
     16 */
     17 
     18 #ifndef REPEAT_H
     19 #define REPEAT_H
     20 
     21 #include <stdio.h>
     22 #include <stdlib.h>
     23 #include <sys/types.h>
     24 #include <sys/wait.h>
     25 #include <unistd.h>
     26 
     27 /* lib.c */
     28 int parse_positive_int(char const *);
     29 int execute_command(char **);
     30 
     31 #endif /* REPEAT_H */