diff options
Diffstat (limited to 'libmaketmpfilefd.html')
-rw-r--r-- | libmaketmpfilefd.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmaketmpfilefd.html b/libmaketmpfilefd.html index baf6be99..587648ad 100644 --- a/libmaketmpfilefd.html +++ b/libmaketmpfilefd.html @@ -24,8 +24,8 @@ pm_make_tmpfile(int * fdP, <h2>EXAMPLE</h2> -<p>This simple example creates a temporary file, writes "hello -world" to it, then writes some search patterns to it, then uses +<p>This simple example creates a temporary file, writes "hello +world" to it, then writes some search patterns to it, then uses it as input to <b>grep</b>: <pre> @@ -36,12 +36,12 @@ const char * myfilename; pm_make_tmpfile_fd(&fdP, &myfilename); -write(fd, "^account:\\s.*\n", 16); -fprintf(fd, "^name:\\s.*\n", 13); +write(fd, "^account:\\s.*\n", 16); +fprintf(fd, "^name:\\s.*\n", 13); close(fd); -asprintfN(&grepCommand, "grep --file='%s' /tmp/infile >/tmp/outfile"); +asprintfN(&grepCommand, "grep --file='%s' /tmp/infile >/tmp/outfile"); system(grepCommand); |