1 .TH fag 1 "16 February 2018" "1.2" "User Commands"
4 fag \- daemonize program after a pattern was matched (ForkAfterGrep)
11 .RI [ ARGUMENTS .\|.\|.]
17 to search the output of
19 for the regular expression
21 and daemonizes it when a match is found. The PID is then returned on stdout.
23 .SS "Behaviour Changing Options"
32 is given, PROGRAM is kept running and daemonized.
34 .BR \-k "[" \fISIGNAL\fP "]
37 has been reached, send a signal to
42 The signal may only be given as a number.
58 The file will be opened in append mode. If the file does not exist, it will be created with file mode \fI0600\fR.
73 .SS "Generic Program Information"
76 Output a short usage message and exit.
79 Display version and copyright information and exit.
80 .SS "Supported grep Options"
82 .BR \-E ", " \-F ", " \-G ", " \-P
83 Matcher selection switches for extended regular expressions, fixed strings, basic regular expressions (default) or Perl-compatible regular expressions. At most one of them may be supplied.
85 .BR \-i ", " \-w ", " \-x ", " \-U
86 Matching control switches for ignore case distinctions, whole words only, whole lines only and treat as binary.
89 Decompression switches for
93 Not widely supported; check your
99 was found, 0 is returned. Otherwise, the exit status follows the BSD guideline outlined in
100 .B #include <sysexits.h>
101 if the error occurred from within
103 or in case the child process exits prematurely, its exit code is inherited. Notably, \fI69\fP is returned when the timeout is reached.
106 logging stops when a timeout is reached.
108 if grep gets killed (e.g. `killall grep'), fag should terminate.
110 Please report bugs and patches to the issue tracker at https://github.com/girst/forkaftergrep/.
116 supplied in the path. This behaviour can be overridden with the environment variable
122 output is line-buffered.
124 from the GNU coreutils can adjust buffering options. If a program is still too clever,
126 creates a pty to wrap around a program.
130 gets interrupted or terminated before a match is found (or the timeout has been reached), this signal is passed to
133 In version 1.2 the command line switch
134 .B \-e was renamed to
138 own switches. An error will be thrown when
142 is supplied as an argument.
144 Copyright 2017-2018 Tobias Girstmair. This is free software released under the terms of the GNU General Public License Version 3; see https://www.gnu.org/licenses/gpl-3.0.html for conditions.
146 Tobias Girstmair (https://gir.st/)